A guide to Java SimpleDateFormat in examples

Today I want to show you some examples of how you can use SimpleDateFormat class in your code. I hope some of them will be new and surprising!
The basic example
First the most basic usage of the class. Lets use it to format Date object into a simple string showing day, month and a year:

SimpleDateFormat simpleDateFormat [...]

How to check if String is parseable to Integer or Double?

This seems basic, right? In most cases it is, but as almost everything in Java this problem has its subtle pitfalls and problems. It is mainly because Java does not provide a simple utility method that can answer this question. Today I wanted to share with you several ways of solving this problem and describe [...]

Are your Strings splitting right?

On a scale from 1 to 10 the issue I talk today about is about 2… unless it will bite your behind and make you randomly scream WTF’s for two hours:) So today’s motto is: beware of small things! At first take a look at the following code snippet:

public class LineParser {
[...]