<p>Yeah ofcourse, but only on one condition : any one of that class inside the java file must be of public and have same name as of that java file.</p>
<p>Yes ofcourse.We can do this through inner class concept.The different types inner class are static inner class,nonstatic inner class,local inner class,annonymous inner class.</p>