public class Test { final String s; public Test() { s = "default"; } public Test(String s) { } public static void main(String[] args) { System.out.println(new Test().s); } }
Login in to like
Login in to comment
Compilation error can be skipped and "default" will be displayed.
2015 Nov 28, 11:51:57 AM
or Read more about Java Quizzes
Login in to like
Login in to comment