Sail E0 Webinar
Question
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
}
}
Options:
A .  One
B .  Compilation fails due to an error on line 1
C .  Compilation fails due to an error on line 2
D .  Compilation succeed but no output.
Answer: Option B

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