Ask your own question, for FREE!
Computer Science 22 Online
GeorgeMartin:

what is the difference between the int main () in c++ and that of java

Brynabent:

I actually have no idea about computer

Brynabent:

But this link can help u. https://www.tutorialspoint.com/difference-between-void-main-and-int-main-in-c Hope this works out!!

SmokeyBrown:

I am not very familiar with C++, but I know that in Java the "main" method can be declared as static, whereas in C++ "main" cannot be declared as static. More details on "main" in C++ can be found in this article https://docs.microsoft.com/en-us/cpp/cpp/main-function-command-line-args?view=msvc-160 Also, normally when I write a "main" method in Java, I give it one argument, args, but the article instructs the use of two arguments, argc and argv. I'm not sure if this is a fundamental difference or just a matter of convention, but it may be worth mentioning

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!