Font size:
Print
Question:
1. MyClass mc= new MyClass();
2. MyClass mc= MyClass();
3. MyClass mc= MyClass;
4. MyClass mc= new MyClass;
Check Answer
Consider;
public class MyClass
{
public MyClass() { /*code*/ }
//more code
}
To instantiate MyClass, you would write?
1. MyClass mc= new MyClass();
2. MyClass mc= MyClass();
3. MyClass mc= MyClass;
4. MyClass mc= new MyClass;
Check Answer