import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;
/**
*
* @author Laptop88
*/
public class LopDate {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
SimpleDateFormat df1= new SimpleDateFormat("dd/mm/yyyy");
SimpleDateFormat df2= new SimpleDateFormat("mm/dd/yyyy");
SimpleDateFormat df3= new SimpleDateFormat("yyyy/mm/dd");
Scanner kb=new Scanner(System.in);
try {
System.out.println("Nhap vao ngay thang nam : ");
Date input=df1.parse(kb.nextLine());
System.out.println("In ra ngay theo dinh dang khac: "+df2.format(input));
System.out.println("In ra ngay theo dinh dang khac: "+df3.format(input));
System.out.println("In ra ngay theo dinh dang khac: "+input);
} catch (ParseException ex) {
}
}
}