What happens when you compile/run the following code:
class MyClass {
public static void main(String[] args) {
new MyClass();
}
Ans:
It executes and create a object for that class without reference. The output of the program is nothing.
class MyClass {
public static void main(String[] args) {
new MyClass();
}
Ans:
It executes and create a object for that class without reference. The output of the program is nothing.
Comments
Post a Comment