This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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?
Similar Threads
Interface question
please ans. this question regarding interface
Interface inheritace
Marker Interface