How do you seperate a string such as "ABCDEFG" in to "A","B" etc and store each letter as a character, i know you can seperate the string as follows:
String s="ABCD";
String s1= s.substring(0,1);
String s2= s.substring(1,2);
//etc..
//and you have
s1=A...
Help!!!!!!!!!!!!!!!!
Can anyone help me with my problem, i need to seperate a string e.g. ABCDEFG, after the second character. Bearing in mind the string is from a user input, how to i locate the position of seperation and how seperate it into two variables?
Thank you in advance
MSB18
I know how to add two strings together using java, but how do you seperate them a certain point, such as after the 'B' in ABCD to make 'AB' and 'CD'????
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.