I have an array of Strings like this:
private String time[] = {"8:00:00 AM", "8:00:00 PM"};
The array of strings is then displayed in a JComboBox.
My question is: How can I convert/cast/parse the selected String into a Time object whilst still keeping AM and PM times distinct? Would it be best to simply use 24 hour times?
Thanks in advance for any help/advice/guidance.
Here is sample code: You need to iterate through your array and populate yourString value.
Here is a link for Simple date formater