File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Can we change the given interface? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Can we change the given interface?" Watch "Can we change the given interface?" New topic
Author

Can we change the given interface?

Anton Kuzmin
Greenhorn

Joined: Feb 22, 2012
Posts: 19

The DBAccess I got from oracle contains comments above every method. Am I allowed to convert them to javadoc-style comments?
Anayonkar Shivalkar
Bartender

Joined: Dec 08, 2010
Posts: 1541
    
    5

Well, the safest thing I would suggest is not to touch provided file at all. Personally, I didn't change a single character in that file. For synchronization, I used locks in actual methods instead of making interface methods as synchronized.


Regards,
Anayonkar Shivalkar (SCJP, SCWCD, OCMJD, OCEEJBD)
Roel De Nijs
Sheriff

Joined: Jul 19, 2004
Posts: 7056
    
  28

Anayonkar Shivalkar wrote:For synchronization, I used locks in actual methods instead of making interface methods as synchronized.

Making an interface method synchronized That results in a compiler error...

You can't make any changes to the method signatures. I didn't convert the comments above every method into javadoc-style comment (just added some javadoc-style comment at the class-level)

Note: please do not wake up zombie threads, just start a new thread and ask your question there. Thanks!


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
OCAJP 7
Anayonkar Shivalkar
Bartender

Joined: Dec 08, 2010
Posts: 1541
    
    5

Roel De Nijs wrote:Making an interface method synchronized That results in a compiler error...

my bad (how did I miss it? )
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Can we change the given interface?
 
It's not a secret anymore!