Java Integer Convert To convertIntegerToTwoCharString(int integer)

Here you can find the source of convertIntegerToTwoCharString(int integer)

Description

convert Integer To Two Char String

License

Open Source License

Parameter

Parameter Description
day a parameter

Return

Integer as a 2 character string

Declaration

private static String convertIntegerToTwoCharString(int integer) 

Method Source Code

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

public class Main {
    /**//from   ww w .  j av  a  2s .  c  om
     * @param day
     * @return Integer as a 2 character string
     */
    private static String convertIntegerToTwoCharString(int integer) {
        String string;
        if (integer < 10) {
            string = "0" + Integer.toString(integer);
        } else {
            string = Integer.toString(integer);
        }
        return string;
    }
}

Related

  1. convertIntDouble(int[][] in)
  2. convertInteger(String input, int maxLen)
  3. convertInteger(String str)
  4. convertIntegerArrayToInt(Integer[] integerArray)
  5. convertIntegerToInt(Integer[] values)
  6. convertInteralNameToResourceName(String type1)
  7. convertInternalClassNameToQualifiedName(String className)
  8. convertInternalFormToQualifiedClassName( final String classInternalName)
  9. convertIntFromBytes(byte[] byteArray)