Hello, I have some opinions.
What follows makes references to:
Java Language Specification 2nd ed. (
http://java.sun.com/docs/books/jls/second_edition/ html/j.title.doc.html).
8.1.2 states, "An inner class is a nested class that is not explicitly or implicitly declared static...." [see below for continuation of quote]
[For Reference: (Ch. 8, 2nd paragraph) "A nested class is any class whose declaration occurs within the body of another class or interface...."]
8.1 ("Class Declaration"), 8.1.1 ("Class Modifiers"), and the above (8.1.2) lead to this implication:
-->A nested class with the modifier "static" in its declaration is a nested class "explicitly ... declared static" and hence not an "inner class".
==> This would disqualify choice 4.
Continuing with above quote at 8.1.2 "... Inner classes may not declare static members, unless they are compile-time constant fields." (Spec follows this with sample code to clarify.)
==> Choices 1 and 2 would constitute declarations with "static members" and hence are not inner classes.
==> I can't find anything wrong with 3 or 5.
jl
ps. Did this make sense? Is it correct? I did not know how to quote more while keeping things clear... search for the Java Language Specification 2nd ed. at Sun's site.