Date x=someobject.getLastRanDate();
System.out.println(x);
For the above code, I am getting the output in yyyy-MM-dd HH:mm:ss format. How is this happening or how can we do this ?
Note : getLastRanDate()
method is getting the date from Database which is storing in the Date Variable.
PS : Please don't answer about SimpleDateFormat.parse(). I explicitly mentioned output variable should be Date object.