Java Array Declaration Bracket Placement

java

Solution

In Java:

String args[]

is exactly equivalent to:

String[] args

Problem

I'm trying to print "Hello World" from a Java program, but I am a little confused with the main method: ``` public static void main(String[] args) ``` and ``` public static void main(String args[]) ``` Both these functions perform the same task. How does this happen? I know the function of String but not of the args.

Original source

Related problems