Quantcast
Channel: Static nested class in Java, why? - Stack Overflow
Viewing all articles
Browse latest Browse all 15

Answer by Mark Renouf for Static nested class in Java, why?

$
0
0

One of the reasons for static vs. normal have to do with classloading. You cannot instantiate an inner class in the constructor of it's parent.

PS: I've always understood 'nested' and 'inner' to be interchangeable. There may be subtle nuances in the terms but most Java developers would understand either.


Viewing all articles
Browse latest Browse all 15

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>