When I run the following program:
public class Test
{
public static void main(String[] args)
{
System.out.println(args);
}
{
It's a string array.
public class Test{
public static void main(String[] args){
System.out.println(args[0]);
}
}
$>javac Test.java
$>java Test hello
This will print: "hello"
Because "hello" is the argument you are passing to your class.
If you try: args[x], where x=0..n
and run your class via command line: java Test your arguments, then you will see any contents which you pass..