Question: public class firstExample { public static void main ( String kjghkjhk [ ] ) { test t 1 = new test ( ) ; t

public class firstExample {
public static void main(String kjghkjhk[])
{
test t1= new test();
t1.setNumber(5);
test t2= new test();
t2.setNumber(5);
if (t1== t2)
System.out.println("True");
else
System.out.println("False");
}
}
class test
{
int number;
void setNumber(int i)
{
number = i;
}
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!