Package snap.viewx

Class ConsoleIO

java.lang.Object
snap.viewx.ConsoleIO

public class ConsoleIO extends Object
This is an interface to the console class to provide static convenience methods.
  • Constructor Details

    • ConsoleIO

      public ConsoleIO()
  • Method Details

    • print

      public static void print(Object anObj)
      Maps to System.out.print.
    • println

      public static void println()
      Maps to System.out.println.
    • println

      public static void println(Object anObj)
      Maps to System.out.println.
    • printErr

      public static void printErr(Object anObj)
      Maps to System.err.println.
    • readln

      public static String readln(String prompt)
      Maps to Scanner(System.in).nextLine().
    • readInt

      public static int readInt(String prompt)
      Maps to Scanner(System.in).nextInt().
    • readDouble

      public static double readDouble(String prompt)
      Maps to Scanner(System.in).nextDouble().
    • random

      public static double random()
      Maps to Math.random() * limit.
    • randomInt

      public static int randomInt(int limit)
      Maps to Math.random() * limit.
    • randomDouble

      public static double randomDouble(double limit)
      Maps to Math.random * limit.
    • show

      public static void show(Object anObj)
      Show object.