Java Member inner class
A non-static class that is created inside a class but outside a method is called member inner class.
Syntax:
Java Member inner class example
In this example, we are creating msg() method in member inner class that is accessing the private data member of outer class.
Output:
data is 30
Sign up here with your email
ConversionConversion EmoticonEmoticon