I am learning how for loops work. I need to print the values
1a 2b 3c
This is what I have tried so far:
int [] numbers ={1, 2, 3}; String [] letters = {"a","b","c"}; for (int n: numbers){ for( String l:letters){ Log.i("sas","Result " + n +l); } } This code is obviously not working. It gave me
1a 1b 1c 2a 2b 2c 3a 3b 3c
How can I fix the loop to give a result of 1a 2b 3c?