i am writing caeser cipher game. So When i start decrypt the cipher text, characters are written with uppercase. I need to make equal the uppercase string with the original one with the lowercase so that game can be finish. With this code it always continue even i finish decrypt the same string(a quote). Anyone knows how to do it ? str1, shr1 = cipher text. User = 1 or 2 is the mods of the game so dont mind it.
       String chose=str1;
        while (user==1) {   
            do {
                System.out.println("Please enter a letter what you want to replace: ");
                String choose1 = in.next();
                System.out.println("Please enter a letter what you want to replace with it: ");
                String choose2 = in.next();
                chose = chose.replace(choose1,choose2.toUpperCase());
                System.out.println(chose);       
            } while (chose!=str1);
        }
        String chose1 = shr1;
        while (user==2) {           
            do {
                System.out.println("Please enter a letter what you want to replace: ");
                String choose1 = in.next();
                System.out.println("Please enter a letter what you want to replace with it: ");
                String choose2 = in.next();
                chose1 = chose1.replace(choose1,choose2.toUpperCase());
                System.out.println(chose1);          
            } while (chose1!=shr1);
        }
