
difference detween "public static void main (String[] args) " and "public static void main (String args[])" in java but it executes both ,in java which one is legal

The only difference is style, where "String args[]" can mean a "string array called args which is an array" and the "String[] args" which basically says it?s a "string array called args". Either way it describes the same thing.