Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. public class HelloWorld{
  2.  
  3. public static void main(String []args){
  4. try{
  5. java.util.Date mDate;
  6. java.text.SimpleDateFormat readFormat = new java.text.SimpleDateFormat("yyyy-mm-dd");
  7. mDate = readFormat.parse("2017-02-05");
  8. System.out.println("date: " + mDate.toString());
  9. } catch (java.text.ParseException e1) {
  10. e1.printStackTrace();
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement