This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
For the == operator to work ... I think the two objects compared must be of same type or must belong to the same hierarchy .
Here your two object reference variables are vastly different and neither reference type extends the other , so theres no way both reference variables can refer to same object(== tests if they refer to same object). Hence == cannot be applied.