I know i have to use the Integer "a" in the loop for. But, why if i use other Integer "b" the loop dont work?
package com.codegym.task.task07.task0707;
import java.util.ArrayList;
/*
What sort of list is that?
*/
public class Solution {
public static void main(String[] args) throws Exception {
ArrayList <String> list = new ArrayList<String>();
list.add("CASA");
list.add("CAA");
list.add("ASA");
list.add("CAA");
list.add("CA");
int i = list.size();
for (int a = 0; a < i; a++){
int b = 0;
String s = list.get(b);
System.out.println(s);
b++;
}
//write your code here
}
}