Guest User

Untitled

a guest
Nov 21st, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. public static void main (String...args){
  2.  
  3. String[][] matriz={
  4.  
  5. {"b","b"},
  6. {"b","b"}
  7.  
  8.  
  9. };
  10.  
  11. for(int i=0; i<2; i++){
  12. System.out.println(" ");
  13.  
  14. for(int j=0; j<2; j++){
  15.  
  16. System.out.print(matriz[i][j] + " / ");
  17.  
  18. }
  19. }
  20.  
  21. String tirada1 = matriz[1][0];
  22. String tirada2 = matriz[1][0];
  23. for(int x=0; x<2; x++){
  24. System.out.println(" ");
  25.  
  26. for(int y=0; y<2; y++){
  27. //String tirada1 = matriz[1][0];
  28. if(matriz[x][y]==tirada1 && matriz[x][y].equals("b") ){
  29. matriz[x][y]="M";}
  30.  
  31.  
  32.  
  33.  
  34. }}
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42. for(int r=0; r<2; r++){
  43. System.out.println(" ");
  44.  
  45. for(int n=0; n<2; n++){
  46.  
  47. System.out.print(matriz[r][n] + " / ");
  48.  
  49. }
  50. }
  51.  
  52. }
Add Comment
Please, Sign In to add comment