Mostrando entradas con la etiqueta arraylist. Mostrar todas las entradas
Mostrando entradas con la etiqueta arraylist. Mostrar todas las entradas
20 marzo 2012
#{ Java: Colecciones, listas, mapas, etc. }
http://www.codercorp.com/blog/java/why-concurrenthashmap-is-better-than-hashtable-and-just-as-good-hashmap.html
http://javarevisited.blogspot.com/2010/10/difference-between-hashmap-and.html
http://stackoverflow.com/questions/40471/differences-between-hashmap-and-hashtable
http://stackoverflow.com/questions/1361784/hashmap-and-hashtable-in-multithreaded-environment
http://www.coderanch.com/t/374477/java/java/Books-java-collections-framework
11 diciembre 2011
#{ Java: Convertir un resultSet a ArrayList }
public ArrayList resultSetToArrayList(ResultSet rs) throws SQLException{
ResultSetMetaData md = rs.getMetaData();
int columns = md.getColumnCount();
ArrayList results = new ArrayList();
while (rs.next()) {
HashMap row = new HashMap();
results.add(row);
for(int i=1; i<=columns; i++){
row.put(md.getColumnName(i),rs.getObject(i));
}
}
return results;
}
http://amcubes.com/2009/02/20/converting-resultset-into-arraylist/
14 enero 2011
Suscribirse a:
Entradas
(Atom)