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 leadingZeroes(int number) {
        String temp = Integer.toString(number);
        if (temp.length() < 3) {
            int iterations = 3 - temp.length();
            for (int i = 0; i < iterations; i++) {
                temp = "0" + temp;
            }
        }
        return temp;
    }
}