+ 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.

28th Oct 2021, 12:15 PM
ltsRoy
ltsRoy - avatar
2 Respuestas
+ 2
java doesn't have nested methods, but has nested classes, also classes defined inside methods https://code.sololearn.com/cy8ckMUzX6Bn/?ref=app
28th Oct 2021, 1:28 PM
zemiak
+ 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.
28th Oct 2021, 4:32 PM
A͢J
A͢J - avatar