|
|
| java programming |
Expert:meenakshi
how we can create a nested function |
| Answers |
Hello,
In bellow code there is firstFunction(), through this we call other function secondFunction();
public class NestedFunction {
public static void main(String[] args) { NestedFunction nestedFunction = new NestedFunction(); nestedFunction.firstFunction(); } public void firstFunction(){ System.out.println("In First Function."); secondFunction(); } public void secondFunction(){ System.out.println("In Second Function."); } }
|
| More Questions |
|
|
Post Answers
Ask Question
Facing Programming Problem?
|
|
|
|
|