+ 1
Do all the methods called inside main method become nested methods?
If I call any method inside the main method, do they all become examples of nested method? If not, then when exactly do we call a method a nested method? Please help me.
2 Answers
+ 2
java doesn't have nested methods, but has nested classes, also classes defined inside methods
https://code.sololearn.com/cy8ckMUzX6Bn/?ref=app
+ 1
Im'ma Coder R
When you call any method it doesn't mean that is nested method. Nested method is what a method inside another method but Java doens't have nested method features.