Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static String getHour(int Hour) {
        StringBuilder hourStr = new StringBuilder();
        if (Hour < 10) {
            hourStr.append("0" + Hour);
        } else {
            hourStr.append(Hour);
        }

        return hourStr.toString();
    }
}