File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Interface Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Interface Question" Watch "Interface Question" New topic
Author

Interface Question

Vidyavathi saravanan
Ranch Hand

Joined: Sep 24, 2004
Posts: 34


This is one of Dan's question. Answer given as ABCI.
My doubt is the inteface member s1 by default is 'public static final'. If that is the case, how come the subclasses are allowed to modify the variable s1. Please explain
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
The subclasses are not modifiying the static final variable I.s1, they are redefining it. Each of the classes A,B and C has its very own String variable s1.
[ October 20, 2004: Message edited by: Barry Gaunt ]

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
 
Don't get me started about those stupid light bulbs.
 
subject: Interface Question
 
Similar Threads
Object orientation
interface
Q from Dan's exam
Doubt in an Interface Question!!
interface rule