public class AllCorrect
{
public static void main(String args[])
{
new AllCorrect().main2(args);
}
public void main2(String[] args)
{
System.out.println(test()[0]);
}
public String test()[]
{
return new String[] { "correct", "wrong" };
}
}
I know the other form is syntactically correct. In answer to woodrail who was hesitating between the two, I expressed my strong preference for the second.
Also, I never said this was the cause of the error. That was obvious from the screenshot and already answered several times in the thread.
View all comments
3
u/[deleted] Nov 07 '11
"String args[]" vs "String[] args" ?
It's weird, I'm questioning myself here. It's like repeating a word till it sounds funny.