Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Java equals()

Name: Anonymous 2009-05-18 5:38

I want to put an equals() method in all of mine immutable (final) classes.
Should I use the instanceof or the getClass() approach?

thanks!

Name: Anonymous 2009-05-18 6:07

For instance, consider a square class that extends a rectangle class.

Hoo, boy.  A standard interview question you just flunked!

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List