Hi
we want to know that if we put another argument in place of String array in main function then what will happened ?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Apr 15, 2012, 9:18 AM
There's nothing in the docs to say it's permissible and, when I tried it just now, I got a "could not find the main class" exception.
SenthilkumarPosted Apr 14, 2012, 9:38 AM
It is fixed format. Either you can have the command line as arguments or nothing.
In case if you have any requirement to store other than string type then you need explicit type conversion.
If you change into any other data type and compilation will give the errors.
Hope this will help you.
VulpesPosted Apr 14, 2012, 8:51 AM
The argument has to be a String array to accept any command line arguments that may be passed to it - no other type will do.