+ 4

What is java args?

What is it?

14th Nov 2018, 7:26 PM
Potato Hacker
Potato Hacker - avatar
4 Respostas
+ 17
//I guess "public static void main(String args []){}" 1) args is String array which stores arguments passed through command line //here on SL it have no purpose as U are not giving inputs through command line , U will be using it while working with command prompt 2)btw array can take other name also , so U can use some other name also in place of "args" , like U can use "hy" , "hacker" , "hello3" , "whats_up" etc //☺✌
14th Nov 2018, 7:44 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 3
Gaurav Agrawal Thanks you! i was talking bout public static void main(String args[ ]){}
14th Nov 2018, 7:47 PM
Potato Hacker
Potato Hacker - avatar
+ 3
String[] args is a collection of strings, separated by a space. The arguments of type String that your Java application accepts when you run it.
14th Nov 2018, 9:45 PM
Danijel Ivanović
Danijel Ivanović - avatar
+ 1
args is the name of an array of type String
15th Nov 2018, 11:17 AM
REINALDO MOJICA ARCOS (Egresado)
REINALDO MOJICA ARCOS (Egresado) - avatar