Java tutorial
//package com.java2s; public class Main { public static String getASCII(int begin, int end) { StringBuffer sb = new StringBuffer(); for (int i = begin; i < end; i++) { sb.append(i).append(":").append((char) i).append("/t"); // sb.append((char) i).append("/t"); if (i % 10 == 0) { sb.append("/n"); } } return sb.toString(); } }