+ 1
[DUPLICATE] what does (String[] args) in 'void main (String[] args) ' means?
5 Answers
+ 3
it's actually
void main(String args[])
it's not that necessary. it basically declares an array of strings which can be taken as input in while calling main and used in the method
+ 1
when we give input in cmd that time when u enter value of any data type it gets converted to string...but if u write int args[ ] ...it willl complie the code but. won't execute
so conversion of any data any data type to string is. easy for compiler
+ 1
its a main declare use method
+ 1
main method
0
it means that the main method can take an array of arguments which are usually passed in as cmdline arguments to your program. note that since they are defined as strings all arguments passed in will be represented as strings and you have to later on parse then and convert them to other types if you need to operate on them such as the case with numbers