File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Mock Exam Errata and the fly likes method in interface? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "method in interface?" Watch "method in interface?" New topic

method in interface?

jordan gong
Ranch Hand

Joined: Jun 12, 2001
Posts: 37
Dear Helper:
Can the methods in interface be synchronized?
Can private method be overriden?
Can transient variable be written to output files?
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Jordan,
Yes methods defined in interfaces can be synchronized. Since each class that implements the method will be required to handle it accordingly.
No, private methods can not be overridden because they are not visible by any other class (including subclasses).
Yes, transient variables can be written to output files. JLS only specifies that transient variables will not be serialized when the class is serialized.
Jane Griscti
Ranch Hand

Joined: Aug 30, 2000
Posts: 3141
Hi Jordan,
I'm going to move this to Certification Study. This forum is only for reporting possible mock exam errors.
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform

Jane Griscti
SCJP, Co-author Mike Meyers' Java 2 Certification Passport
I agree. Here's the link:
subject: method in interface?
It's not a secret anymore!