aspose file tools*
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 Java 8 in Action this week in the Java 8 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Automatic Variables??
 
Similar Threads
wrong question, wrong answer
inner classes
Interesting question from javacross!
inner class access?
JQ+ Question