Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main (String...args){
- String[][] matriz={
- {"b","b"},
- {"b","b"}
- };
- for(int i=0; i<2; i++){
- System.out.println(" ");
- for(int j=0; j<2; j++){
- System.out.print(matriz[i][j] + " / ");
- }
- }
- String tirada1 = matriz[1][0];
- String tirada2 = matriz[1][0];
- for(int x=0; x<2; x++){
- System.out.println(" ");
- for(int y=0; y<2; y++){
- //String tirada1 = matriz[1][0];
- if(matriz[x][y]==tirada1 && matriz[x][y].equals("b") ){
- matriz[x][y]="M";}
- }}
- for(int r=0; r<2; r++){
- System.out.println(" ");
- for(int n=0; n<2; n++){
- System.out.print(matriz[r][n] + " / ");
- }
- }
- }
Add Comment
Please, Sign In to add comment