Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. 00000
  2. 00000
  3. 00000
  4.  
  5. X0000
  6. 00000
  7. 00000
  8.  
  9. import java.util.*;
  10. import java.lang.*;
  11.  
  12. class Main
  13. {
  14. public static void main (String[] args) throws java.lang.Exception
  15. {
  16. String[][] array = {{"0","0","0"},{"0","0","0"},{"0","0","0"}};
  17.  
  18. System.out.println("Before: ");
  19. printArray(array);
  20.  
  21.  
  22. array[0][0] = "x";
  23. System.out.println("After: ");
  24. printArray(array);
  25.  
  26. }
  27.  
  28. private static void printArray(String[][] array){
  29. for(int i=0; i<array.length; i++){
  30. for(int j=0; j<array[0].length; j++){
  31. System.out.print(array[i][j]);
  32. }
  33. System.out.println("");
  34. }
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement