your code will always print "hello", as Campbell pointed out.
'args' holds the list of arguments. If on the command like you type this:
c:\>java sgra
you have no arguments, so args is empty.
if you type this:
c:\>java sgra this has four arguments
args will be an array of strings. It will have four elements that look like this:
args[0] = this
args[1] = has
args[2] = four
args[3] = arguments
with your code, if you type in MORE than nine arguments, you will get something else printed. try this:
c:\>java sgra this has a whole boatload of arguments passed into it so i should see something else printed
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors