How can I first print out on a single line all of my table’s column name of my table like this:
X Y Z
8 15.99 Oxygen
Table table;
table = new Table();
table.addColumn("X");
table.addColumn("Y");
table.addColumn("Z");
table.setInt(0, "X", 8);
table.setFloat(0, "Y", 15.99);
table.setString(0, "Z", "Oxygen");
print(table.getInt(0, "X") + " ");
print(table.getFloat(0, "Y") + " ");
print(table.getString(0, "Z") + " ");
The Output now is:
8 15.99 Oxygen
I want this output:
X Y Z
8 15.99 Oxygen