Ir para conteúdo
  • 0

MySQL & List


lxt

Pergunta

6 respostass a esta questão

Posts Recomendados

public List<String> getLista() {

 

List<String> list = new ArrayList<>();

 

try {

PreparedStatement ps = ...;

ResultSet rs = ...;

 

while(rs.next()) {

list.add("MEGA ROLUDO");

}

 

rs.close();

ps.close();

} catch (Exception e) {

e.printStackTrace();

}

 

return list;

 

}

 

Arrays.toString(getLista().toArray(new String[0)).replace("[", "").replace("[", "");

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...