[SCJP2, SCWCD1.3, SCBCD]
Originally posted by padmini Babu:
Question ID :954959230968
Which variables of the encapsulationg class, can an inner class access if the inner class is defined in an instance method of the encapsulating class?
options:select three correct answers:
// c refers to correct answers.
options;
a. All static variables ==c
b. All instance variables. -c
c. All final instance varibales. -c
d. All automatic varibales = wrong
e. All automatic final variables. == c
Originally posted by Scott Appleton:
Padmini, there is no such animal as a "static instance variable", by definition. The keyword "static" means "non-instance".
Originally posted by padmini Babu:
What I tried to do is use a static variable in a method and tried to access it from the inner class. It did not work. Hence, through a slip of wordings i used the word " static instance variable " .
what I actually wanted to ask is that a static variable in the enclosing class is only accessible and not a static variable from the enclosing method. Hence, the wordings of the answer should have been like - " All static variables of the enclosing class " instead of " All static variables " .
Anyway , the concept is clear. Thanks everybody.
Padmini
[This message has been edited by padmini Babu (edited June 21, 2001).]
Jane Griscti
SCJP, Co-author Mike Meyers' Java 2 Certification Passport
Originally posted by padmini Babu:
Question ID :954959230968
Which variables of the encapsulationg class, can an inner class access if the inner class is defined in an instance method of the encapsulating class?
options:select three correct answers:
// c refers to correct answers.
options;
a. All static variables ==c
b. All instance variables. -c
c. All final instance varibales. -c
d. All automatic varibales = wrong
e. All automatic final variables. == c
Well, I think the first one should be "All static instance variables" rather than just " All static variables" .
Anybody correct me if I am wrong. Also if there is a different opinion , please give an example too.
Thanks in advance
Padmini
Enthuware - Best Mock Exams and Questions for Oracle Java Certifications
Quality Guaranteed - Pass or Full Refund!
Enthuware - Best Mock Exams and Questions for Oracle Java Certifications
Quality Guaranteed - Pass or Full Refund!
AM<BR> <A HREF="mailto:anshulmohan@rediffmail.com" rel="nofollow">anshulmohan@rediffmail.com</A>
Enthuware - Best Mock Exams and Questions for Oracle Java Certifications
Quality Guaranteed - Pass or Full Refund!
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |