Do you want to know how to develop your skillset to become a Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!

 

1. JPA Mini Book

2. JVM Troubleshooting Guide

3. JUnit Tutorial for Unit Testing

4. Java Annotations Tutorial

5. Java Interview Questions

 

and many more ....

 

 

Don’t rewrite Your Application

When stuck with a legacy code base you’ll hear the claim “We’ll have to rewrite this from scratch in order to fix it!” It sounds promising. You start with a clean slate. You can do all the good stuff without all the mistakes. The only problem: It doesn’t work. Here is why. What every you might think of the code ...

Read More »

Java Concurrency Tutorial – Blocking Queues

As discussed in Part 3, the thread pools introduced in Java 1.5 provided core support that was quickly a favourite of many java developers. Internally, the implementations make smart use of another concurrency feature introduced in java 1.5 – Blocking Queues. Queue First, a brief review of what a standard queue is. In computer science, a queue is simply a ...

Read More »

Sometimes in Java, One Layout Manager Is Not Enough

Most often when developing Java Swing applications, we need to use several layout managers in several nested panels. This is usually not a problem and is considered the normal practice for all UI development in almost all languages known to man. However, most often for each panel in the UI only one layout manager is needed to achieve the desired ...

Read More »

Java Concurrency Tutorial – Callable, Future

One of the beautiful things about Java from its very first release was the ease with which we could write multi-threaded programs and introduce asynchronous processing into our designs. The Thread class and Runnable interface combined with Java’s memory management model meant for straightforward thread programming. But as discussed in Part 3, neither the Thread class nor the Runnable interface ...

Read More »

Getting to know the ‘hosts’ file

We had a lecture on DNS today in class and I thought I’d write something about the built-in domain name mapping file present in all of our computers. This file is a very interesting one. You get a lot of uses from it and at the same time it exposes you to a lot of security threats. But before going ...

Read More »

CPU vs. GPGPU

GPGPU is a new trend and it has triggered many new questions in the minds of young computer scientists. In this post, I cover some of the FAQs on this topic. What types of problems are better suited to regular multicore and what types are better suited to GPGPU? GPUs contain some fixed function and programmable hardware. While GPUs are ...

Read More »

Java Concurrency Tutorial – Thread Pools

One of the most generally useful concurrency enhancements delivered in Java 1.5 was the introduction of customizable thread pools. These thread pools give you quite a bit of control over things such as number of threads, reuse of threads, scheduling and thread construction. Let’s review these. First, thread pools. Let’s dive right into java.util.concurrent.ExecutorService, which provides us the basic interface ...

Read More »

Java Concurrency Tutorial – Reentrant Locks

Java’s synchronized keyword is a wonderful tool – it allows us a simple and reliable way to synchronize access to critical sections and it’s not too hard to understand. But sometimes we need more control over synchronization. Either we need to control types of access (read and write) separately, or it is cumbersome to use because either there is no ...

Read More »

Mapping Objects to Multiple XML Schemas – Weather Example

I have written previous posts on EclipseLink JAXB (MOXy)‘s @XmlPath and external binding file extensions. In this post I will demonstrate how powerful these extensions are by mapping a single object model to two different XML schemas. To make the example more “real”, the XML data will come from two different services that provide weather information: Google and Yahoo. Java ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns