Class StdArrayIO


  • public class StdArrayIO
    extends Object
    Standard array IO. This class provides methods for reading in 1D and 2D arrays from standard input and printing out to standard output.

    For additional documentation, see Section 2.2 of Introduction to Programming in Java: An Interdisciplinary Approach by Robert Sedgewick and Kevin Wayne.

    • Constructor Summary

      Constructors 
      Constructor Description
      StdArrayIO()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(String[] args)
      Test client.
      static void print​(boolean[] a)
      Print an array of booleans to standard output.
      static void print​(boolean[][] a)
      Print the M-by-N array of booleans to standard output.
      static void print​(double[] a)
      Print an array of doubles to standard output.
      static void print​(double[][] a)
      Print the M-by-N array of doubles to standard output.
      static void print​(int[] a)
      Print an array of ints to standard output.
      static void print​(int[][] a)
      Print the M-by-N array of ints to standard output.
    • Method Detail

      • print

        public static void print​(double[] a)
        Print an array of doubles to standard output.
        Parameters:
        a -
      • print

        public static void print​(double[][] a)
        Print the M-by-N array of doubles to standard output.
        Parameters:
        a -
      • print

        public static void print​(int[] a)
        Print an array of ints to standard output.
        Parameters:
        a -
      • print

        public static void print​(int[][] a)
        Print the M-by-N array of ints to standard output.
        Parameters:
        a -
      • print

        public static void print​(boolean[] a)
        Print an array of booleans to standard output.
        Parameters:
        a -
      • print

        public static void print​(boolean[][] a)
        Print the M-by-N array of booleans to standard output.
        Parameters:
        a -
      • main

        public static void main​(String[] args)
        Test client.
        Parameters:
        args -