Table print columnName as 1 row

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

Processing.GitHub.io/processing-javadocs/core/processing/data/Table.html#getColumnTitles--

final Table t = new Table();

t.setColumnTitles(new String[] { "X", "Y", "Z" });
t.setColumnTypes(new int[] { Table.INT, Table.FLOAT, Table.STRING });

t.addRow(new Object[] { 8, 15.99, "Oxygen" });

println(t.getColumnTitles());

print(t.getInt(0, "X"), TAB);
print(t.getFloat(0, "Y"), TAB);
println(t.getString(0, "Z"));

println();
t.print();

exit();