Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public String endUp(String str) {
- if (str.length()<3)
- return str.toUpperCase();
- String up=str.substring(str.length()-3,str.length()).toUpperCase();
- str=str.substring(0,str.length()-3);
- return str+up;
- }
Advertisement
Add Comment
Please, Sign In to add comment