What are the rules as far as the interface provided are concerned? Must the interface be left untouched and unchanged? There are some annoying line comments that I would prefer to change into javadoc comments. Can I do this? Must the comments be left there? etc etc.
SCJP 6.0, SCJD (400/400), SCBCD for JEE 5, SCWCD 1.4 I do videos for development at
I am probably the only developer ever to have had an orange sized brain tumor in my brain while learning development!!
I personally don't see why the interface's comments need to be changed. If you understand those comments, you would know what to do (how to implement). If you don't understand, then you should post your worries.
Also Sun's given interface is just the "must implement" methods. Many other people feel that there are other "must" implement methods that should be included in the interface file. It is up to you where these other methods go.
No, the interface cannot be changed. About the comments, I guess you can change them, since they won't interfere in the program's execution. I prefered to leave them just as I received them, but used JavaDoc comments, instead of code comments.
I also added my own comments to those from SUN, especially at the lock() method where I added some more rules to follow in order to avoid deadlocks. I also javadoc'ed runtime exceptions that I chose to throw.
I don't see why the comments cannot be changed, since they are not part of the actual interface, they're not affecting how the interface looks like in terms of code.