Originally posted by bennido kool kat:
If I override both methods and I don't follow the contract, will the compiler or JVM give an error ?
No. As long as you do a correct override (same return type, no new check exceptions, public access modifier, etc) It will not complain at all. you will only get inconsistent results in your application.
[ July 10, 2003: Message edited by: Andres Gonzalez ]