Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Created by DARK WRATH on 08-02-2017.
- */
- import java.util.*;
- public class AltLowerCase
- {
- public static void main(String args[])
- {
- Scanner s=new Scanner(System.in);
- System.out.println("Enter the sentence");
- String se1=s.nextLine();
- String se2=se1.replaceAll("['QWERTYUIOPASDFGHJKLZXCVBNM']", "['qwertyuiopasdfghjklzxcvbnm']");
- System.out.print(se2);
- }
- }
- // this will result logical error. So better avoid. //
- // however its not the logic. just trying a different approach. //
- //one should always go for String.toLowercase() //
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement