Reputation: 4771
I want to declare an array of strings but Java is complaining when I do this: String[] ss = ("A", "B", "C", "D");
What am I doing wrong?
Upvotes: 3
Views: 261
Reputation: 61515
Try replacing the parentheses with braces:
String[] ss = {"A", "B", "C", "D"};
Upvotes: 10