22:31

Nesting Method

Posted by Mitesh Patel |


class MyClass {

    void show() {
        System.out.println("Just Free Knowledge");
    }

    void call() {

        show(); // call show method

    }
}

class FunctionNesting {

    public static void main(String args[]) {

        MyClass x = new MyClass();
        x.call();

    }
}

0 comments:

Post a Comment

Subscribe