A

Admin • 832.27K Points
Coach

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

  • (A) true
  • (B) this
  • (C) String associated with obj1
  • (D) Compilation Error
  • Correct Answer - Option(C)
  • Views: 34
  • Filed under category Java
  • Hashtags:

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.