fork(13) download
  1. import java.util.*;
  2. import java.lang.*;
  3.  
  4. class Main
  5. {
  6. public static void main (String[] args) throws java.lang.Exception
  7. {
  8. String[][] array = {{"0","0","0"},{"0","0","0"},{"0","0","0"}};
  9.  
  10. System.out.println("Before: ");
  11. printArray(array);
  12.  
  13.  
  14. array[0][0] = "x";
  15. System.out.println("After: ");
  16. printArray(array);
  17.  
  18. }
  19.  
  20. private static void printArray(String[][] array){
  21. for(int i=0; i<array.length; i++){
  22. for(int j=0; j<array[0].length; j++){
  23. System.out.print(array[i][j]);
  24. }
  25. System.out.println("");
  26. }
  27. }
  28. }
Success #stdin #stdout 0.02s 245632KB
stdin
Standard input is empty
stdout
Before: 
000
000
000
After: 
x00
000
000