Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static String timeConvert(int time) {
- int min = time / 60;
- int sec = time % 60;
- if(min < 10){
- if(sec < 10)
- return "0" + min + ":0" + sec;
- return "0" + min + ":" + sec;
- }
- if(sec == 0)
- return "" + min + ":00";
- if(sec < 10)
- return "" + min + ":0" + sec;
- return "" + min + ":" + sec;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement