Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the similarity between dynamic binding and linking?

1069


Can you pass functions in java?

957


Explain reverse a linked list iterative solution in java?

887


What are advantages of exception handling in java?

979


Can memory leak happen java?

972


What is string syntax?

1016


Why does java not support pointers?

1024


Can we convert stringbuilder to string in java?

945


What is difference between static and final?

1018


Can we rethrow the same exception from catch handler?

1087


Does sprintf allocate memory?

1053


When the constructor of a class is invoked?

983


What do you mean by constructor?

932


Why do we need singleton class?

937


Can we override private constructor in java?

917