QUESTION : 18
What happens when you try to compile and run the following program?
1. class Mystery {
2.
String s;
3. public static void main(String args[]) {
4. Mystery m = new Mystery();
5. m.go();
6. }
7. void Mystery() {
8. s = "Constructor";
9. }
10. void go() {
11. System.out.println(s);
12. }
13. }
The answer is "print null" , why?
Thanks