Single Choice
Not Set
Q
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();
}
}
which one is correct
ID: #2189
Java Constructor and Methods
904 views
Question Info
#2189Q ID
Not SetDifficulty
Java Constructor and MethodsTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
Compilation Error
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic