Hello guys I'm new to Java and would like to take this challenge myself, since I'm new I need some help from you.
I have a Java string like this:
String strTime = "8:44 PM";
I would like to get the hr, min and am/pm.. How can I do that? I'm also thinking if the hour is 2-digit? What else should I be considering? Thanks for your help.
UPDATE:
String[] parts[] = strTime.split(":");
String strHr = parts[0];
String strMin = parts[1];
String strAM = parts[2];
But I don't know how to capture for the other to be split like the space, etc.