How to create an array of strings

PLEASE PROVIDE ME WITH A SUITABLE APPROACH OF THIS QUESTION.
HOW TO CREATE AN ARRAY OF STRINGS?
I TRIED TO DO IT BY CREATING A 3D ARRAY OF CHARACTERS BUT IT WAS QUIET HECTIC.

Hi Manan,
Take an input of t test cases. For each test case you need 2 string inputs say str1 and str2. Now make a stringbuilder ‘ans’. Since we have been given str1.length() == str2.length(), we traverse from for(i=0;i<str1.length();i++). If charAt(i) is same for both strings append 0 else append 1 to ‘ans’. And when the for loop breaks, print ‘ans’.
Also, please share your code so that I can suggest a better approach if possible.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.