Single Choice
Not Set
Qwhich one is correct:
class MyClass{
int i;
int j;
public MyClass(int i, int j){
this.i = i;
this.j = j;
}
public void call(){
System.out.print("One");
}
}
public class Test{
public static void main(String args[]){
MyClass m = new MyClass(); //line 1
m.call(); //line 2
}
}
ID: #2187
Java Constructor and Methods
1,036 views
Question Info
#2187Q 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 fails due to an error on line 1
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic