Inner class

class inside outer class is called inner class.

types of inner class :

1) Member inner class---> class inside outer class.
2) Local inner class----> class inside method of outer class.
3) anonymous inner class--->abstract and interface inner class inside outer class.
4) static inner class----> static class inside outer inner class.

Member inner class:

class college{
    int id=123;
	 
	class student{
	   void show(int id){
	    System.out.println(id);
	 }
	}
	
	void display(){
       student s=new student();
       s.show();
    }
	
    public static void main(String args[]){
        college c=new college();
        c.display();
	}
 }
 
          

output:
123
	
          

Address

Plot number-56/1
Near Gurudwara
LandMark :
Opposite A.N.D college
Govindpuri Metro station
New Delhi
Mobile number:
8826034620