This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Automatic Variables?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Automatic Variables??" Watch "Automatic Variables??" New topic
Author

Automatic Variables??

Mike Kelly
Ranch Hand

Joined: Jul 18, 2001
Posts: 78
Question ID :955554894422
Which variables of the encapsulationg class, can an inner class access if the inner class is defined in a static method of encapsulating class?
a. All static variables
b. All final instance variables
c. All automatic variables
d. All instance variables
e. All final automatic variables

Sorry, I'm not familiar with the term automatic variables. Could someone please explain? Thanks.
Corey McGlone
Ranch Hand

Joined: Dec 20, 2001
Posts: 3271
Originally posted by Mike Kelly:
Sorry, I'm not familiar with the term automatic variables. Could someone please explain?

Automatic variables is just another name for parameters in a method.
I hope that helps,
Corey


SCJP Tipline, etc.
Jose Botella
Ranch Hand

Joined: Jul 03, 2001
Posts: 2120
Answer is A.
maha anna has explained it in a previous post
automatic variables are those declared in a method.
Because is asking only for variables in the containing class, I would leave out the final local variables. Though they are the only automatic variables (along with final parameters) accessible by a local nested class.


SCJP2. Please Indent your code using UBB Code
Mike Kelly
Ranch Hand

Joined: Jul 18, 2001
Posts: 78
Thanks, Jqplus gave the answer as A & E.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Automatic Variables??
 
Similar Threads
JQ+ Question
inner classes
inner class access?
Interesting question from javacross!
wrong question, wrong answer