//
// Ascii.java
//

/** Outputs the readable ASCII table from 32 to 127. */
public class Ascii {

  public static void main(String[] args) {
    int max = 255;
    if (args.length > 0) max = Integer.parseInt(args[0]);
    for (int i=32; i<=max; i++) {
      String s = "" + i;
      if (i < 100) s = " " + s;
      if (i < 10) s = " " + s;
      System.out.print(s + " " + (char) i + "\t");
      if (i % 10 == 1) System.out.println();
    }
    System.out.println();
  }

}

//
// Ascii.java
//

/** Outputs the readable ASCII table from 32 to 127. */
public class Ascii {

  public static void main(String[] args) {
    for (int i=32; i<128; i++) {
      String s = "" + i;
      if (i < 100) s = " " + s;
      if (i < 10) s = " " + s;
      System.out.print(s + " " + (char) i + "\t");
      if (i % 10 == 1) System.out.println();
    }
    System.out.println();
  }

}

--- 
+++ 
@@ -6,7 +6,9 @@
 public class Ascii {
 
   public static void main(String[] args) {
-    for (int i=32; i<128; i++) {
+    int max = 255;
+    if (args.length > 0) max = Integer.parseInt(args[0]);
+    for (int i=32; i<=max; i++) {
       String s = "" + i;
       if (i < 100) s = " " + s;
       if (i < 10) s = " " + s;
Add option to specify maximum character to list in the table;
default maximum to 255 instead of 127.

