I need to print a two dimensional array with string values like a table.
So far my code is:
import java.util.Arrays;
public class Employee {
public static void main(String[] args) {
String wages[][] =
{
{"Emp", "Hours", "Wages"},
{"Bobby", "45", "35"},
{"Rick", "15", "33"},
{"Mike", "66", "50"},
{"Jayme", "15", "45"}
};
System.out.print(Arrays.deepToString(wages));
System.out.println();
}
}
The output is:
[[Emp, Hours, Wages], [Bobby, 45, 35], [Rick, 15, 33], [Mike, 66, 50], [Jayme, 15, 45]]
I need it to look more like a table with separate rows (5 rows 3 columns)