Nettbrett, ett rett brett?

Det har vært mange diskusjoner rundt politikernes ønske om å innføre nettbrett, eller mer konkret, innføring av iPad som en del av lokalpolitikernes hverdag. Hovedbegrunnelsen var da at man ønsket å finne metoder som hjalp til med å kutte ned på utgifter. Det gikk jo en god del utgifter årlig bare på utskrifter og slikt. Read more about Nettbrett, ett rett brett?[…]

Use try-with-resources statement

The try-with-resources statement is introduced in the Java 7. With this new statement we can simplify resource management in our program, it also known as ARM (Automatic Resource Management). This statement is a try statement that declares one or more resources. After the program finish with the resource it must be closed. The try-with-resources ensures Read more about Use try-with-resources statement[…]

How to automatically close resources in JDBC

One thing that we need to do manually when programming using JDBC is to make sure to close all the resources that we use. All resources including the ResultSet, Statement and Connection must be closed. This usually will produce a lot of boiler plate code in our program. Starting from JDBC 4.1 which is a Read more about How to automatically close resources in JDBC[…]