how to convert mm/dd/yy to dd/mm/yy using collections in
java.
Answer Posted / sankar
Hi, Here is the Program
import java.util.Date;
import java.text.SimpleDateFormat;
class DateConversion{
public static void main(String ar[])throws Exception
{
String strDate = "06/12/2008";
SimpleDateFormat srcDate = new SimpleDateFormat
("mm/dd/yyyy");
SimpleDateFormat destDate = new SimpleDateFormat
("dd/mm/yyyy");
System.out.println(destDate.format
(srcDate.parse(strDate)));
}
}
Is This Answer Correct ? | 19 Yes | 6 No |
Post New Answer View All Answers
Is void a data type?
What is one third plus one third as a fraction?
What is the final variable?
Discuss different types of errors that generally occur while programming.
Explain how to force the garbage collection in java.
Can vector have duplicates in java?
Can you extend singleton class?
What are the object and class classes used for?
What exactly is java?
java program with complete 4 oops concepts implemented example
List the different types of classloaders in java.
Explain what do you mean by functional overloading in java?
Can we initialize the final blank variable?
Is upper case in java?
Why declare Main() method as a static in java ?