S

Sonali Mishra • 4.53K Points
Extraordinary

Q. What will be the output of the following Java program?
class A
{
int i;
int j;
A()
{
i = 1;
j = 2;
}
}
class Output
{
public static void main(String args[])
{
A obj1 = new A();
A obj2 = new A();
System.out.print(obj1.equals(obj2));
}
}

  • (A) false
  • (B) true
  • (C) 1
  • (D) Compilation Error
  • Correct Answer - Option(A)
  • Views: 33
  • Filed under category JAVA

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics