Compiler output
prog.java:1: error: class, interface, or enum expected
public static boolean consecutiveDigits(int[] digits) {
^
prog.java:2: error: class, interface, or enum expected
for (int i = 1; i <= 3; i++) {
^
prog.java:2: error: class, interface, or enum expected
for (int i = 1; i <= 3; i++) {
^
prog.java:5: error: class, interface, or enum expected
}
^
prog.java:8: error: class, interface, or enum expected
}
^
prog.java:10: error: class, interface, or enum expected
public static boolean isPowerOfTwo(int hours, int minutes) {
^
prog.java:13: error: class, interface, or enum expected
return ((n == 1024) || (n == 2048));
^
prog.java:14: error: class, interface, or enum expected
}
^
prog.java:16: error: class, interface, or enum expected
public static boolean acceptable(int[] digits) {
^
prog.java:18: error: class, interface, or enum expected
int minutes = digits[2] * 10 + digits[3];
^
prog.java:19: error: class, interface, or enum expected
int minutesReverse = digits[3] * 10 + digits[2];
^
prog.java:21: error: class, interface, or enum expected
if ((hours > 23) || (minutes > 59)) {
^
prog.java:23: error: class, interface, or enum expected
}
^
prog.java:27: error: class, interface, or enum expected
}
^
prog.java:29: error: class, interface, or enum expected
public static void main(String[] args) {
^
prog.java:31: error: class, interface, or enum expected
int n = sc.nextInt();
^
prog.java:33: error: class, interface, or enum expected
for (int i = 0; i < n; i++) {
^
prog.java:33: error: class, interface, or enum expected
for (int i = 0; i < n; i++) {
^
prog.java:33: error: class, interface, or enum expected
for (int i = 0; i < n; i++) {
^
prog.java:35: error: class, interface, or enum expected
line.replace(":", "");
^
prog.java:37: error: class, interface, or enum expected
int[] digits = new int[4];
^
prog.java:38: error: class, interface, or enum expected
for (int j = 0; j < 4; j++) {
^
prog.java:38: error: class, interface, or enum expected
for (int j = 0; j < 4; j++) {
^
prog.java:38: error: class, interface, or enum expected
for (int j = 0; j < 4; j++) {
^
prog.java:44: error: class, interface, or enum expected
} else {
^
prog.java:46: error: class, interface, or enum expected
}
^
prog.java:50: error: class, interface, or enum expected
}
^
27 errors
javac failed: errno= return=256 at /home/marius/perl5/bin/gruntmaster-compile line 22.