Explore >> Select a destination


You are here

blog.schauderhaft.de
| | blog.scaledcode.com
16.2 parsecs away

Travel
| | A dive into chapter eleven of Effective Java
| | componenthouse.com
9.9 parsecs away

Travel
| | I wanted tocompare how Java, C++ and C perform whenreading a text file line by line and printing the output. I've implemented some possibilities and, at the end, we can compare the speed of each execution. Java 7 version (BufferedReader) import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; public class Main7 { private static final...
| | www.craigpardey.com
8.5 parsecs away

Travel
| | Spring 3.2 has some very nice features for scheduling tasks. The pure Java way of doing this looks something like private ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor(); class ScheduledTask implements Runnable { @Override public void run() { System.out.println("Running scheduled task"); } } // Schedule a task every 5 seconds executor.scheduleAtFixedRate(new ScheduledTask(), 1, 5, TimeUnit.SECONDS); // If you don't do this then the JVM won't exit cleanly executor.shutdown(); But now, with the snazzy new Spring scheduling annotations, it can be as simple as this
| | cupano.com
21.8 parsecs away

Travel
| My Blog Posts. Contribute to joecupano/blog development by creating an account on GitHub.