This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes modifiers for class variables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "modifiers for class variables" Watch "modifiers for class variables" New topic
Author

modifiers for class variables

Kareem Qureshi
Ranch Hand

Joined: Mar 14, 2002
Posts: 102
this is a question from certification4career
19)
A class variable is declared using following modifiers
a.protected
b.private
c.public
d.static
can anybody tell me why answers a,b,c along with d are not valid. or i am missing something here?
i am talking of public static int a = 1; or private static int a = 1;
thanks in advance
kareem
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9043
    
  10
"A class variable is declared using following modifiers "

I think they meant the question to read more like, "Which modifier creates a variable which is a class variable".


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: modifiers for class variables
 
Similar Threads
interface within class or interface
What restricts fields from Serialization
non-static variable this cannot be referenced from a static context
may you guess where error I get: script: stop/start animation image
transient and volatile variables