-4
public static void main(String[] args)

What is String[] args?

When would you use args?

Rahul Tripathi
  • 168,305
  • 31
  • 280
  • 331
kitaniboy
  • 15
  • 1
  • 2
  • 1
  • If you're referring to the argument in your `main` function, these are the command line arguments. You can do with them whatever you like: https://docs.oracle.com/javase/tutorial/essential/environment/cmdLineArgs.html – Reut Sharabani Jul 12 '16 at 11:56
  • http://docs.oracle.com/javase/tutorial/essential/environment/cmdLineArgs.html – Rahul Tripathi Jul 12 '16 at 11:57

2 Answers2

0

args is a name of a String array. Is compulsory in your main method in java in order to receive the parameters for the input.

If your application receives some inputs, they will be loaded in args, each of them as a String inside the array in the given order. Otherwise, args will be a empty array.

More information here

SCouto
  • 7,808
  • 5
  • 32
  • 49
0

These are the arguments of type String that your Java application accepts when you run it. They are console parameters given by the user.