Advertisement
Guest User

Untitled

a guest
Apr 18th, 2015
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. public class Colours {
  2. public static void main(String[] args) {
  3. String[] a = {"white", "black", "green", "brown", "yellow", "blue", "red"};
  4.  
  5. for (int i = 0; i < a.length; ++i) {
  6. System.out.print(a[i] + " ");
  7.  
  8. if (i % 3 == 2)
  9. System.out.println();
  10. }
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement