What is wrong in the following code?
1 class Test {
2 public static void main(String[] args) {
3 A a = new A();
4 a.print();
5 }
6 }
7
8 class A {
9 String s;
10
11 A(String newS) {
12 s = newS;
13 }
14
15 public void print() {
16 System.out.print(s);
17 }
18 }
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.