Sail E0 Webinar
Question
Class MyClass{
      MyClass(){
            System.out.print("one");
      }
      public void myMethod(){
            this();
            System.out.print("two");
      }
}
 
public class TestClass{
      public static void main(String args[]){
            MyClass obj = new MyClass();
            obj.myMethod();
      }
}
Options:
A .  two one one
B .  one one two
C .  one Exception
D .  Compilation Error
E .  None of these
Answer: Option D

Submit Your Solution Below and Earn Points !
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

More Questions on This Topic :


Latest Videos

Latest Test Papers