This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I have commented out the line a above , because if i use the variable a , it is showing an compile time error as Array Constants can only be used in initializers
Because what you're trying to do isn't an initializer.
If you said a = new String[] { ... } it would work (I think), but I'm not a fan of assigning parameters, as it can lead to poor thinking about what's actually happening.
Because with "a = {...}" it is not clear to the compiler what the type of "a" is. Consider:
It could look at the declared type (so Object[]) but because it's still ambiguous the compiler disallows it.