Java String Leading Character addLeadingZero(final int value)

Here you can find the source of addLeadingZero(final int value)

Description

add Leading Zero

License

Open Source License

Declaration

private static String addLeadingZero(final int value) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    private static String addLeadingZero(final int value) {
        if (value < 10) {
            return "0" + value; //$NON-NLS-1$
        } else {// w w w  .java  2  s .  c  om
            return String.valueOf(value);
        }
    }
}

Related

  1. addLeadingSlash(String string)
  2. addLeadingSpace(String s, int len)
  3. addLeadingSpace(String s, int len)
  4. addLeadingUnixSlash(String fileName)
  5. addLeadingZero(byte[] value)
  6. addLeadingZero(String aString, int aAmountOfZeros)
  7. addLeadingZeroesTo16BitBinaryString(String binaryValue)
  8. addLeadingZeros(Object number, int places)
  9. addLeadingZeros(String deweyCallNum)