I am trying to go through every char of a string and get the first char, which can be found in the 1st, 2nd, … space. So, this is what I have:
String add1 = "A2B";
String add2 = "BDR";
String result = "BFT";
String line = add1+add2+result;
char aChar;
for(int i=0; i<aChar; i++) {
aChar = line.charAt(i);
System.out.println(aChar);
}
I think that I am a little bit confused. Any help is appreciated.
Your for loop should read