J

Jatin Dubey • 3.78K Points
Extraordinary

Q. Determine output

Code:
public class Test{
	int i = 34;
	public static void main(String args[]){
		Test t1 = new Test();
		Test t2 = new Test();
		t1.i = 65;
		System.out.print(t1.i);
		System.out.print(t2.i);
	}
}
  • (A) 34 34
  • (B) 65 34
  • (C) 65 65
  • (D) 34 65
  • Correct Answer - Option(B)
  • Views: 106
  • 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