1. Does real exam contain such "long" code questions, if yes about what is the ratio of "long code" questions to all other questions.?
2. Does the real exam ask such quesions in which the questions appear to belong to one topic and the correct answer is "compiler error" because of some fundamental mistake in some other topic.(misleading questions)???
3. do majority of the code questions contain "Compiler Error" as one of the options.
has any one got 100% in exam???, then i would like them to share their secreat with me.
however, if the block containing a local class decleration is defined in a static context , then the local class is implicitly static in the sense that its instantiation does not require any outer object
Originally posted by Jigar Gosar:
Which of the follow are true statements.
a. A nested class is any class that is declared within the body of another class or interface.
b. A nested class can not be declared within the body of an interface declaration.
c. An inner class is a nested class that is not static.
d. A nested class can not be declared static.
e. A named class is any class that is not anonymous.
Answers : a c e
i have problem with 'c' being correct.
heres is my explaination:
All local and anon classes are nested classes .(Mughal ch7.)
All local and anon classes are inner classes .(Mughal ch7.)
local and anon classes declared in static context are implicitly static, (although they cannot be declared explicitly).
so now we have an inner class(local or anon, in static context) that is static, which contradicts 'c'.
so how can 'c' be true???
An inner class is a nested class that is not explicitly or implicitly declared static.