public class StdArrayIO extends Object
For additional documentation, see Section 2.2 of Introduction to Programming in Java: An Interdisciplinary Approach by Robert Sedgewick and Kevin Wayne.
Constructor and Description |
---|
StdArrayIO() |
Modifier and Type | Method and 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.
|
static boolean[] |
readBoolean1D()
Read in and return an array of booleans from standard input.
|
static boolean[][] |
readBoolean2D()
Read in and return an M-by-N array of booleans from standard input.
|
static double[] |
readDouble1D()
Read in and return an array of doubles from standard input.
|
static double[][] |
readDouble2D()
Read in and return an M-by-N array of doubles from standard input.
|
static int[] |
readInt1D()
Read in and return an array of ints from standard input.
|
static int[][] |
readInt2D()
Read in and return an M-by-N array of ints from standard input.
|
public static double[] readDouble1D()
public static void print(double[] a)
public static double[][] readDouble2D()
public static void print(double[][] a)
public static int[] readInt1D()
public static void print(int[] a)
public static int[][] readInt2D()
public static void print(int[][] a)
public static boolean[] readBoolean1D()
public static void print(boolean[] a)
public static boolean[][] readBoolean2D()
public static void print(boolean[][] a)
public static void main(String[] args)