Android Int Pad addZreoIfLessThanTen(int i)

Here you can find the source of addZreoIfLessThanTen(int i)

Description

add Zreo If Less Than Ten

Declaration

public static String addZreoIfLessThanTen(int i) 

Method Source Code

//package com.java2s;

public class Main {

    public static String addZreoIfLessThanTen(int i) {

        String string = "";
        int ballNum = i + 1;
        if (ballNum < 10) {
            string = "0" + ballNum;
        } else {/*from ww  w . j  a v a  2  s.c  o  m*/
            string = ballNum + "";
        }
        return string;
    }
}

Related

  1. pad(int c)
  2. addZeroPrefix(int value)
  3. paddedInt(int value, int charcount)