Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Thanks, Pankaj, for sharing another helpful post. But I want to add something to it: In the first paragraph of this post, you have said: “… whereas an outer class can have only private or default access.” It should rather be: “… whereas an outer class can have only PUBLIC or default access.” Do I make a point here?
- Rishi Raj
Typo fix: “Java nested classes are defined as class inside the body of another class. A nested class can be declared private, public, protected, or with default access whereas an outer class can have only private or default access.” private should be switched to private Awesome work, Keep it up
- antoine cordier
Since inner classes are associated with instance, we can’t have any static variables in them… true but If we use ‘static final int mytest=0 ;’ it is allowed!
- Deepak
What are the benefits of annonymous inner class? Explain with example.
- Sundara Baskaran
for local inner class we can access local non-final variable in the scope it’s defined.(java version 8 and above)
- Ganesh
The statement about Method Local Inner Classes needs changes. It says “A local inner class can access all the members of the enclosing class and local final variables in the scope it’s defined.”. The correct statement should be “A local inner class can access all the members of the enclosing class and local final variables in the scope it’s defined. Additionally it can also access non final local variable of method in which it is defined, but it cannot modify them. So if you try to print non final local variable’s value it will be allowed but if you try to change its value from inside method local inner class, you will get compile time Error”
- Amol Bhonsle
Hi Pankaj, The inline code is not available for any of your posts. Can you please suggest what needs to be done? Without the code referenced in your text, there is very less meaning to the post. Thank you!!
- Priyanka