java - Finding if a specific character exists at a specific index -
so i'm trying figure out how create condition decision structure. i'm making program converts military time conventional time. when times entered, must in xx:xx format, x equals digit. i'm wondering, how can make validation checks make sure ":" exists colon , in same spot?
mystring.charat(5) == ':'
just change 5 whatever need, , check string length before this, don't ask past end of short string.
Comments
Post a Comment