pro_java thread: I need some help ...
> HI to all...
>
> > I tring to create a class that will let the user enter a date and it
will
> > display it in two different format.Or just display the date...
> > Example: ( yy / mm / dd ) and ( yy . mm . dd ).
> >
> > Can you PLEASE help me....
> >
> > Thanking you in advance...
> >
> > Gino
> >
import java.util.*;
import java.text.*;
public class DateDemo
{
public static void main(String[] args)
{
SimpleDateFormat sdf = new SimpleDateFormat("yy/MM/dd");
Date d = new Date();
System.out.println(sdf.format(d));
sdf = new SimpleDateFormat("yy.MM.dd");
System.out.println(sdf.format(d));
}
}