Mega Code Archive

 
Categories / Java Tutorial / Data Type
 

Arrays of Strings

public class MainClass {   public static void main(String[] arg) {     String[] colors = {"red", "orange", "yellow", "green", "blue", "indigo", "violet"};          for(String s: colors){       System.out.println(s);            }   } } red orange yellow green blue indigo violet