Aktive lesere: 8

Lokale meninger, globale ytringer

Nettbrett, ett rett brett?

Skrevet av | 5 kommentarer

Det har vært mange diskusjoner rundt politikernes ønske om å innføre nettbrett, eller mer konkret, innføring av iPad som en del av...

Les mer

Get number of active thread group

Skrevet av | 0 kommentarer

Use method activeGroupCount() of ThreadGroup class to get estimate number of active groups in the thread group and use activeCount() to get...

Les mer

Get thread group of a thread

Skrevet av | 0 kommentarer

Use the getThreadGroup() method of Thread class to get the thread group to which the thread belongs. package...

Les mer

Get the state of a thread

Skrevet av | 0 kommentarer

To get the state of a thread use getState() method of a Thread class. One thing to be noted is that this method is designed for use in...

Les mer

Use string in switch statement

Skrevet av | 0 kommentarer

Starting from Java 7 release you can now use a string in the switch statement. On the previous version we can only use number or enum in...

Les mer

Use multi-catch statement

Skrevet av | 0 kommentarer

The multi-catch is a language enhancement feature introduces in the Java 7. This allow us to use a single catch block to handle multiple...

Les mer

Read all lines from a file

Skrevet av | 0 kommentarer

The java.nio.file.Files.readAllLines() method read all lines from a file. This method ensures that the file is closed when all bytes have...

Les mer

Use try-with-resources statement

Skrevet av | 0 kommentarer

The try-with-resources statement is introduced in the Java 7. With this new statement we can simplify resource management in our program,...

Les mer

How to automatically close resources in JDBC

Skrevet av | 0 kommentarer

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...

Les mer

Destroy a thread group

Skrevet av | 0 kommentarer

You can destroy a thread group by using destroy() method of ThreadGroup class. It will cleans up the thread group and removes it from the...

Les mer
Side 1 av 212