Advertisement
Guest User

yep

a guest
Jul 4th, 2015
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. public class classname {
  2.  
  3. public static void main(String[] args) {
  4.  
  5. String number = "50";
  6. StringBuilder str = new StringBuilder(number);
  7. str = str.reverse();
  8. int output= Integer.parseInt(str.toString());
  9.  
  10. if(output < 10){
  11. System.out.println("0"+output);
  12. }
  13. }
  14. }
  15.  
  16. Output is 05
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement