Findryan

Untitled

Nov 13th, 2016
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. public class Array2D
  2. {
  3. public static void main(String[] args)
  4. {
  5. String [][] country ={
  6. {"No","Name","Country"},
  7. {"1.","David","Australia"},
  8. {"2.","Ahmad","Indonesia"},
  9. {"3.","Sudaish","Mesir"},
  10. {"4.","Kim","Korea"}
  11. };
  12. int i, j;
  13. for ( i=0;i<5; i++)
  14. {
  15. for ( j=0;j<3; j++)
  16. {
  17. System.out.print(country[i][j]+" ");
  18. }
  19. System.out.println(""); //pindah baris
  20. }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment