Hello, I am printing on the screen the result of a SELECT that I have stored in an object type resultSet (sql.ResultSet). But it comes out "all crooked". I tried to use the "\ t" between each printed column, but it did not help. Here is the part of the method that interests us:
public void selectCargos(String query){
try {
rs = st.executeQuery(query);
System.out.printf("TABELA DE CARGOS\n\n");
while (rs.next()){
System.out.println("ID: " +rs.getInt("id")+ "\t"+ "Nome do cargo: " +rs.getString("nome")+ "\t" + "Nível do cargo: " +rs.getString("nivel"));