Hello all. How can I achieve the following result in b4J? Here is some java code.
And here is the output in the terminal.
Code:
Object[][] a = {
{1, 3800.20, 2200.42},
{2, 2700.67, 3678.14},
{3, 2900.00, 2694.47}
};
System.out.printf("%3s %-9s %-9s%n", "Day", "Car1", "Car2");
for (Object[] r : a) {
System.out.printf("%-3d %-9.2f %-9.2f%n", r[0], r[1], r[2]);
}
And here is the output in the terminal.
Output:
Day Car1 Car2
1 3800.20 2200.42
2 2700.67 3678.14
3 2900.00 2694.47