Quiz · Classes and objects · lesson 4 of 10
Quiz — new without arguments
What happens when this program is compiled and run?
public class Main {
public static void main(String[] args) {
Point a = new Point(5);
Point b = new Point();
System.out.println("end");
}
}
class Point {
Point(int x) {
System.out.print(x + " ");
}
}