Assume that the following two classes are compiled and run. What is their output?
public class SillyClassDriver{public static void main(String[] args){SillyClass sc = new SillyClass();sc.display();}} // end SillyClassDriver classpublic class SillyClass{private int x = 10;public SillyClass(){this(20);System.out.println(this.x);}public SillyClass(int x){System.out.println(this.x);System.out.println(x);this.x = 30;x = 40;}public void display(){int x = 50;display(x);System.out.println(x);}public void display(int x){x += 10;System.out.println(x);}} // end SillyClass class
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.