| Author |
Locale Class
|
Jitendra Jha
Ranch Hand
Joined: Jan 28, 2007
Posts: 91
|
|
I was trying to work through this code import java.util.*; import java.text.*; class LocaleC { public static void main(String[] srt) { Calendar cc=Calendar.getInstance(); cc.set(1998,04,19); Date d=cc.getTime(); System.out.println(d); Locale lc=new Locale("it","IT"); DateFormat df=DateFormat.getDateInstance(DateFormat.FULL,lc); String s=df.format(d); System.out.println(d); } } this code is supposed to give me locale specific information about Italy which it does not. I am unable to figure out my mistake.Please help Jitendra
|
Jitendra
SCJP1.5
SCWCD1.5
|
 |
Jitendra Jha
Ranch Hand
Joined: Jan 28, 2007
Posts: 91
|
|
Sorry, i figured out my mistake It was the wrong print statement on the last line. I should have passed s instead of d Sorry again to have wasted your precious time Jitendra
|
 |
 |
|
|
subject: Locale Class
|
|
|