Here you can find the source of zeroString(int length)
public static String zeroString(int length)
//package com.java2s; //License from project: Open Source License public class Main { public static String zeroString(int length) { StringBuffer sb = new StringBuffer(); for (int i = 0; i < length; i++) { sb.append('0'); }//from www. j av a 2 s .co m return sb.toString(); } }