Java Programming

non-static nested class vs. static nested class

tomato13 2016. 9. 18. 16:10

http://stackoverflow.com/questions/1353309/java-static-vs-non-static-inner-class


A non-static nested class has full access to the members of the class within which it is nested. A static nested class does not have a reference to a nesting instance, so a static nested class cannot invoke non-static methods or access non-static fields of an instance of the class within which it is nested.





'Java Programming' 카테고리의 다른 글

Override vs. Overload  (0) 2018.12.29
bit & shift operators  (0) 2017.01.02
Static class in Java  (0) 2016.05.31
Be cautious: char size is 2 bytes in java  (0) 2015.03.19
What does java.lang.Thread.interrupt() do?  (0) 2013.08.14