Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error de compilación
Main.java:4: error: class Suma2Num is public, should be declared in a file named Suma2Num.java public class Suma2Num { ^ Main.java:9: error: cannot find symbol MyScanner scanner = new MyScanner(); ^ symbol: class MyScanner location: class Suma2Num Main.java:9: error: cannot find symbol MyScanner scanner = new MyScanner(); ^ symbol: class MyScanner location: class Suma2Num 3 errors |
||
#2 |
Error de compilación
Main.java:4: error: class Suma2Num is public, should be declared in a file named Suma2Num.java public class Suma2Num { ^ Main.java:9: error: cannot find symbol MyScanner scanner = new MyScanner(); ^ symbol: class MyScanner location: class Suma2Num Main.java:9: error: cannot find symbol MyScanner scanner = new MyScanner(); ^ symbol: class MyScanner location: class Suma2Num 3 errors |
||
#3 |
Error de compilación
Main.java:4: error: class Suma2Num is public, should be declared in a file named Suma2Num.java public class Suma2Num { ^ Main.java:9: error: cannot find symbol MyScanner scanner = new MyScanner(); ^ symbol: class MyScanner location: class Suma2Num Main.java:9: error: cannot find symbol MyScanner scanner = new MyScanner(); ^ symbol: class MyScanner location: class Suma2Num 3 errors |
||
#4 |
Error de compilación
Main.java:4: error: class Suma2Num is public, should be declared in a file named Suma2Num.java public class Suma2Num { ^ Main.java:9: error: cannot find symbol MyScanner scanner = new MyScanner(); ^ symbol: class MyScanner location: class Suma2Num Main.java:9: error: cannot find symbol MyScanner scanner = new MyScanner(); ^ symbol: class MyScanner location: class Suma2Num 3 errors |
||
#5 |
Error de compilación
Main.java:4: error: class Suma2Num is public, should be declared in a file named Suma2Num.java public class Suma2Num { ^ Main.java:9: error: cannot find symbol MyScanner scanner = new MyScanner(); ^ symbol: class MyScanner location: class Suma2Num Main.java:9: error: cannot find symbol MyScanner scanner = new MyScanner(); ^ symbol: class MyScanner location: class Suma2Num 3 errors |
import java.io.BufferedOutputStream; import java.io.PrintWriter; public class Suma2Num { public static void main(String[] args) { PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out)); MyScanner scanner = new MyScanner(); int a = scanner.nextInt(); int b = scanner.nextInt(); int suma = a + b; out.print(suma); } }