Can we put any value in the String[] in these brakets? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can we put any value in the String[] in these brakets?

Can we put any value in the String[] in these brakets? LIKE: public staric void main (String ["hello"] args )

2nd Feb 2017, 3:33 PM
U Fc
U Fc - avatar
1 Answer
0
No, this is not going to work. I guess you are referring to String[] args in main method? It just means that you can gibe the main method a String array as an argument. String["text"] is not gonna compile anywhere else in java either. I don't know where you got that but you should take a look at Arrays and how tobuse them in general.
3rd Feb 2017, 12:30 PM
Jannick