Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class classname {
- public static void main(String[] args) {
- String number = "50";
- StringBuilder str = new StringBuilder(number);
- str = str.reverse();
- int output= Integer.parseInt(str.toString());
- if(output < 10){
- System.out.println("0"+output);
- }
- }
- }
- Output is 05
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement