public class Boxer1{ Integer i; int x; public Boxer1(int y) { x = i+y; System.out.println(x); } public static void main(String[] args) { new Boxer1(new Integer(4)); } }
Standard input is empty
Main.java:1: error: class Boxer1 is public, should be declared in a file named Boxer1.java public class Boxer1{ ^ 1 error
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!