I’m storing a string in a database with a value such as “020734”. I would like to be able to pull the string apart.
I have:
String values = "020734";
I need:
String values = "020734";
String value1 = "02";
String value2 = "07";
String value3 = "34";
Could you guys possibly point me in a general direction?
Erm, how about
value1 = values.substring(0, 2); value2 = values.substring(2,4)…etc? That will get you two characters at a time from the string.