Given two strings, A and B, create a bigger string made of the first char of A, the first char of B, the second char of A, the second char of B, and so on. Any le
Here is my Approach, feedback is most welcome
void printPattern(String str, String str1){
int length1 = str.length();
int length2 = str1.length();
int i =0;
String output ="";
while(length1 > 0 && length2 > 0){
output += (str.charAt(i)) ;
output += (str1.charAt(i)) ;
length1-- ; length2-- ; i++;
}
System.out.println(output);
}