Java Number to Roman numberToRoman(int i)

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

Description

number To Roman

Declaration

public static String numberToRoman(int i) 

Method Source Code

//package com.java2s;

public class Main {
    public static String numberToRoman(int i) {
        switch (i) {
        case 1:/*from w  w w. j  av a 2  s.  c  om*/
            return "I";
        case 2:
            return "II";
        case 3:
            return "III";
        case 4:
            return "IV";
        case 5:
            return "V";
        default:
            return Integer.toString(i);
        }
    }
}