indianj
09-29-2005, 09:02 PM
hello everyone, i was going through exercise in book and here is the part i need some help.
Consider this code that creates some location objects with coordinates x=10 and y=20:
Location a, b, c;
a=new Location (10,20);
b=new Location (10,20);
c=b;
after this code executes, what are the values of these boolean expressions?
A= =b
a.equals(b)
a= =c
a.equals(c)
b= =c
b.equals(c)
Consider this code that creates some location objects with coordinates x=10 and y=20:
Location a, b, c;
a=new Location (10,20);
b=new Location (10,20);
c=b;
after this code executes, what are the values of these boolean expressions?
A= =b
a.equals(b)
a= =c
a.equals(c)
b= =c
b.equals(c)