Java tutorial
//package com.java2s; public class Main { private static String converTodu(double mAzim) { // TODO Auto-generated method stub String result = "000"; int i = (int) mAzim; if (i > 100) { result = String.valueOf(i); } else { result = "0" + String.valueOf(i); } return result; } }