Borderou de evaluare (job #2679202)

Utilizator mstevanStevan mstevan Data 29 noiembrie 2020 22:24:13
Problema Submultimi Status done
Runda Arhiva educationala Compilator java | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: Main.java:16: error: non-static variable n cannot be referenced from a static context n = scanner.nextInt(); ^ Main.java:20: error: non-static variable writer cannot be referenced from a static context writer = new PrintWriter(outputStream); ^ Main.java:22: error: non-static variable globalarray cannot be referenced from a static context globalarray = new boolean[n]; ^ Main.java:22: error: non-static variable n cannot be referenced from a static context globalarray = new boolean[n]; ^ Main.java:23: error: non-static variable n cannot be referenced from a static context backtracking(0, n); ^ Main.java:25: error: non-static variable writer cannot be referenced from a static context writer.close(); ^ Main.java:37: error: non-static variable globalarray cannot be referenced from a static context globalarray[i] = false; ^ Main.java:40: error: non-static variable globalarray cannot be referenced from a static context globalarray[i] = true; ^ Main.java:46: error: non-static variable n cannot be referenced from a static context for (int i = 0; i < n; i++){ ^ Main.java:47: error: non-static variable globalarray cannot be referenced from a static context if (globalarray[i]) ^ Main.java:48: error: non-static variable writer cannot be referenced from a static context writer.print(i + 1); ^ Main.java:50: error: non-static variable writer cannot be referenced from a static context writer.print('\n'); ^ 12 errors Non zero exit status: 1

Ceva nu functioneaza?