I have two Strings,A and B, A has the value of "ABCDE" and B the value of "12345" and I would like to make a for loop that makes the String C, to have the value of "A1B2C3D4E5", the problem is that the value of A and B may vary, A and B can be equal or A greater than B just by one character, only these two options are possible:
if(A.length()>B.length()){
B=B+"_";
}
int length=A.length()+B.length();
for(int count = 0; count == length;count++){
C=C+A.charAt(count)+B.charAt(count);
}
System.out.println(C);
But nothing prints out.