Perl tutorials for an advanced level developer

Perl is a nice script language which is easy to use. It is originated as a Unix scripting language and has been improved with a lot of new features from shell scripting, C, etc. Perl is very powerful for text processing. For an experienced developer, the useful tutorial would be a quick introduction of the … Read more

Java Design Pattern: Template Method

The Template Method design pattern defines the workflow for achieving a specific operation. It allows the subclasses to modify certain steps without changing the workflow’s structure. The following example shows how Template Method pattern works. Class diagram Java Code Vehicle.java defines a vehicle and hot it works package com.programcreek.designpatterns.templatemethod;   abstract public class Vehicle { … Read more

Open Source Projects Using Spring Framework

Spring framework is difficult to learn, especially when you want to develop a real project with industry standards. Reading tutorials is a good way for learning at the beginning. But finally, you still need to read code from real projects. Luckily, there are some very good open source projects that use Spring framework. Here are … Read more

Interview Question – Use Java Thread to Do Math Calculation

This is an example for showing how to use join(). Interview question: Use Java multi-threading to calculate the expression 1*2/(1+2). Solution: Use one thread to do addition, one thread to do multiplication, and a main thread to do the division. Since there is no need to communicate data between threads, so only need to consider … Read more