i got problem to convert String time to Time object because it print together with Date. this is my code.
String time = "15:30:18";
DateFormat sdf = new SimpleDateFormat("hh:mm:ss");
Date date = sdf.parse(time);
System.out.println("Time: " + date);
how to convert and print Time only without Date in java. it will be better if you could give an example.
thank you.
See Question&Answers more detail:os