0
Can someone help to understand the difference,why is int in main and not in java
https://code.sololearn.com/clX0DhyR90fR/?ref=app, https://code.sololearn.com/cBt39gANtaoU/?ref=app
8 Antworten
+ 2
Ajoh Pv
Java runs on JVM and JVM can't do anything with returned value that's why main is void as void doesn't return anything.
+ 2
Ajoh Pv
exit () is a another method in System class which terminate JVM and return status to machine. So this method returns not main method returns.
Using this method you are returning indirectly not directly. See the first statement of last answer.
+ 1
Thank you
0
Thank you all
0
What is use of exit code
0
A͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟ with respect to last answer main returns output print so how it does not return anything
0
String args[ ]?
So all(integers) are in stored in strings?
what is. string exactly?