/**
* How to create and use Local Inner Class in Java
*
* Local inner Classes have a block scope and are accessible within the block in which they're declared
*/
public class MainClass {
public static void main(String[] args){
class testing{
public void test(){
System.out.println("local inner class's method called");
}
}
new testing().test();
}
}
* How to create and use Local Inner Class in Java
*
* Local inner Classes have a block scope and are accessible within the block in which they're declared
*/
public class MainClass {
public static void main(String[] args){
class testing{
public void test(){
System.out.println("local inner class's method called");
}
}
new testing().test();
}
}
No comments:
Post a Comment