comparison of strings in Java
<p>I have an accident time variable in my database which is erroneous, for example the time could show up as 55 which means 00:55 or 0 which means 00:00. Another one could be 200 which means 02:00. It has good values as well like 9:15 which I need to make 09:15. It is a 24 hour clock system. Now I am writing a small private method where I need to compare the time(which is a string) and change it to the proper one. I have used .equals to check and see if the string is equal to 0 and assigned it 00:00. I need help to check the greater than or less than for strings in Java(example if time is less than 10 patch it with 0 in the front) and also how do I change 200 to 02:00. Any help appreciated. </p>
