SyntaxFix
Write A Post
Hire A Developer
Questions
You can do the following during declaration:
String names[] = {"Ankit","Bohra","Xyz"};
And if you want to do this somewhere after declaration:
String names[]; names = new String[] {"Ankit","Bohra","Xyz"};