mirror of
https://github.com/AdaCore/why3.git
synced 2026-02-12 12:34:55 -08:00
18 lines
304 B
Java
18 lines
304 B
Java
/* This file has been extracted from module ForLoop. */
|
|
import java.util.Arrays;
|
|
|
|
public class ForLoop {
|
|
|
|
public static boolean allEqualTo(int [] a, int x) {
|
|
|
|
for (int i = 0; i <= (a.length) - 1; i++) {
|
|
if (!(a[i] == x)) {
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
|
|
}
|