+ 2

[DUPLICATE] why main function takes argument "String args[]"

16th Jul 2016, 1:33 PM
Mohan sundaram
Mohan sundaram - avatar
5 Answers
+ 5
It's a placeholder for the default template for console application allowing you to pass values to the program via the command line
16th Jul 2016, 6:10 PM
Brian Stewart
Brian Stewart - avatar
+ 1
main function takes argument for its modular processing purpose, like when you drag a file drop on application icon it passes the path of file to args as like as you pass the path in cmd.
24th Jul 2016, 4:18 AM
jayesh malviya
jayesh malviya - avatar
0
Brian, does it mean that every main class is ultimately considered as array of strings???
17th Jul 2016, 4:51 AM
SiddharthDavda
0
it's command line arguments..
3rd Sep 2016, 4:55 AM
Tom P Samuel
Tom P Samuel - avatar
- 3
args[] that means programing first focus on it so that in program first call main function then other
17th Jul 2016, 6:55 AM
shreyash raiyani
shreyash raiyani - avatar