I get all my values from the database and I put it in array list<object>
I would like to know how to access the value inside that emu arraylist, for example TesteLinhas.get(0).toString()
or something like this returns me to where it is allocated in memory, I believe I. I wish I could get her value. Is there any way?
ArrayList linhas = new ArrayList();
String sql = "SELECT * FROM tb_zerados ORDER BY id ASC";
conexao.pstm = conn.prepareStatement(sql);
conexao.rs = conexao.pstm.executeQuery();
while(conexao.rs.next()){
linhas.add(new Object[]{conexao.rs.getInt("id"),
conexao.rs.getInt("numero"),
conexao.rs.getString("ano"),
conexao.rs.getString("nome"),
conexao.rs.getString("estilo"),
conexao.rs.getString("plataforma"),
conexao.rs.getInt("nota")});
}
System.out.println(linhas.get(1));
It returns me this: [Ljava.lang.Object;@28a8f402
, and I'd like it to return a String
or a Integer
.