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