So to make a long story short. A professor asked this question in class as a discussion starter. Besides the obvious
B = new SomeClass("B"); // But B can be null, can can be new SomeClass("A");
A = new SomeClass("A");
A==B
will guarantee no NPE when comparing, what are the reasons to use B==A instead of A==B?
Where A and B are of same type, and this is language independent. So you can assume A.equals(B) for Java, or equivalent syntax in C or C++ etc....
And no, this is not homework.