Compiler output
prog.java:1: error: class, interface, or enum expected
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
prog.java:2: error: class, interface, or enum expected
String line1 = "";
^
prog.java:3: error: class, interface, or enum expected
String line2 = "";
^
prog.java:5: error: class, interface, or enum expected
try {
^
prog.java:7: error: class, interface, or enum expected
line2 = br.readLine();
^
prog.java:8: error: class, interface, or enum expected
} catch (IOException e) {
^
prog.java:11: error: class, interface, or enum expected
}
^
prog.java:14: error: class, interface, or enum expected
String[] line2Array = line2.split(" ");
^
prog.java:16: error: class, interface, or enum expected
int n = Integer.parseInt(line1Array[0]);
^
prog.java:17: error: class, interface, or enum expected
int forbidden = Integer.parseInt(line1Array[1]);
^
prog.java:19: error: class, interface, or enum expected
List<Integer> inputList = new ArrayList<>();
^
prog.java:21: error: class, interface, or enum expected
for (int count = 0; count < line2Array.length ; count++) {
^
prog.java:21: error: class, interface, or enum expected
for (int count = 0; count < line2Array.length ; count++) {
^
prog.java:21: error: class, interface, or enum expected
for (int count = 0; count < line2Array.length ; count++) {
^
prog.java:23: error: class, interface, or enum expected
}
^
prog.java:28: error: class, interface, or enum expected
for(Integer integer:inputList){
^
prog.java:31: error: class, interface, or enum expected
}
^
17 errors
javac failed: errno= return=256 at /usr/local/bin/gruntmaster-compile line 23.