is this code:
A)
a1 = new SomeClass();
a2 = new SomeClass();
equivalent to:
B)
a1 = a2 = new SomeClass();
??
(explain why)
The trick is how you ask the question, if you asked "what's the difference between option a and option b?" you are already telling them there is a difference.
Saturday, January 13, 2007
Subscribe to:
Post Comments (Atom)
1 comment:
You are creating two instances in the first case, only one in the other.
1/ a1 != a2
2/ a1 == a2
Post a Comment