Simple example to show how to use Date Formatting in Java

The following is a question from "SCJP Sun Certified Programmer for Java 6 Study Guide Exam" by Kathy Sierra and Bert Bates. I personally don't think this is a good question, but it is good to know how to use DateFormat class.

Given that 1119280000000L is roughly the number of milliseconds from Jan 1, 1970, to June 20, 2005, and that you want to print that date in German, using LONG style such that "June" will be displayed as "Juni".

import java.text.*;
import java.util.*;
//import*;// There is such package defined in Java!!
public class DateFormatExample {
    public static void main(String[] args){
        Date d = new Date(1119280000000L);
        DateFormat df = DateFormat.getDateInstance(DateFormat.LONG, Locale.GERMANY);
Category >> Basics  
If you want someone to read your code, please put the code inside <pre><code> and </code></pre> tags. For example:
String foo = "bar";