Refresh Your Java - Before Java Interview
We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....
This is the very important class in the JDBC core
package, it simplifies the use of JDBC
since it handles
the creation and release of resources. This helps to avoid common
errors
like forgetting to always close the
connection.
// create a JdbcTemplate and set data
source
JdbcTemplate jt = new JdbcTemplate();
jt.setDataSource(dataSource);
// create a
custom translator and set the datasource for the default
translation lookup
MySQLErrorCodesTransalator tr = new
MySQLErrorCodesTransalator();
tr.setDataSource(dataSource);
jt.setExceptionTranslator(tr);
// use the JdbcTemplate
for this SqlUpdate
SqlUpdate su = new SqlUpdate();
su.setJdbcTemplate(jt);
su.setSql("update orders set shipping_charge =
shipping_charge * 1.05");
su.compile();
su.update();
This Portal is intended to put all Java/J2ee related topics at one single place for quick referance, not only Technical , but also the Project Management Related thing such as Development Process methodoogies build process, unit testing etc.,
This Portal has More than 500 Java Interview Questions (also could be Considered as Quick Notes) very neatly separated topic by topic with simple diagrams which makes you easily understandable. Importantly these are from our Realtime expericance.