Display time in 24 format : I wanted to get date and time in this format. "2017-02-05 20:20:03". I used following code to get the result. But it didn't work out. 

    System.out.println(new SimpleDateFormat("yyyy-mm-dd HH:mm:ss").format(new Date()));e