 <p>out.println () is a little ugly in terms of readability - but the cost of these calls will be small compared to I/O times.</p> <p>Using + for String concatenation inside your loop might harm your memory footprint (and it's not the fastest way either). Consider this line you have:</p> <pre><code> out.println("&lt;td&gt;"+ rs.getString("FirstName") + " " + rs.getString("LastName") + "&lt;/td&gt;"); </code></pre> <p>You could gain readability and speed and have less char [] left to be garbage collected by coding with <code>format()</code>:</p> <pre><code> out.format ("&lt;td&gt;%s %s&lt;/td&gt;", rs.getString ("FirstName"), rs.getString ("LastName")); </code></pre> <p><strong>More Notes</strong></p> <p>You create and connect a new database connection every time your servlet is called. This will severly impact your performance and scalability. You should consider using a connection pool from which you fetch pre-connected Connections. The performance you gain will make up for very many String concats or println calls.</p>