Why calling main() method from main() gives StackOverflowError in java? -
this question has answer here:
- what stackoverflowerror? 12 answers
- what causes stack overflow error? [duplicate] 10 answers
i new java. had doubt in java since main()
static
in java, why can't call main()
.
class test { public static void main(string args[]) { main(null); } }
once tried above code got stackoverflowerror. why did error main()
static
method(also method)? part of memory code filling up? please descriptive in answer.
Comments
Post a Comment