Lets assume that I store values to List A, List B & List C through for loop. List A,B,C values is added by the following way:
for (int j = 0; j <5; j++)
{
list_A.add("Value"+i);
list_B.add("Value"+i);
list_C.add("Value"+i);
}
To access the List out of the method I'm using this keyword by the following way:
private CharSequence ListA[]; // declaration
this.ListA= list_A.toArray(new CharSequence[list_A.size()]); //accessing with this keyword
Now I am adding all these list to another List by the following way
List<List<String>> finallist = new ArrayList<>();
finallist .add(list_A);
finallist .add(list_B);
finallist .add(list_C);
I did some searching but I couldn't find how to declare and access List< List< String>> using this keyword?
Note: It is the actual modification of the question that I have asked here. As I couldn't get any answer, I thought I could make it bit simple and have raised the question here.