import java.util.Scanner; public class Test{ public static void main(String[] args) { Scanner S1 = new Scanner(System.in); Scanner S2 = new Scanner(System.in); int A = S1.nextInt(); int B = S2.nextInt(); System.out.println(A + B); } } /* Main.java:3: error: class Test is public, should be declared in a file named Test.java public class Test{ ^ 1 error */ |
Double click to view unformatted code.