• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

method in interface?  RSS feed

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Helper:
Can the methods in interface be synchronized?
Can private method be overriden?
Can transient variable be written to output files?
Thanks.
 
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Regards,
Manfred.
 
Ranch Hand
Posts: 3141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I can't beleive you just said that. Now I need to calm down with this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!