I encountered a question that asks \"Which of the following are true about the \"default\" constructor?\"
and an option \"It initializes the instance members of the cla
It does. Although the question is based more on usage.
public class Main { String x; Main() { x = "Init"; } @Override public String toString() { return x; } public static void main(String[] args) { System.out.println(new Main()); } }
Ouput:
Init