There is such a structure: a list of arrays of objects ( ArrayList<Word[]> result ).

The object class itself is defined as follows:

 public static class Word { int ind; String word; String role; int parent; String synrole; } 

The main problem is that I cannot break through to the fields of objects in this complex structure.
I read somewhere that saves the appeal result.get(0).word . In my case, another level is needed, but the compiler swears to write result.get(0).get(0).word .

How to get to the fields of objects in a similar structure?

    1 answer 1

    Since result.get(0) returns an array ( Word[] ), then the element of the array must be accessed using [index] :

     result.get(0)[0].word 
    • Brilliant) Thanks for the quick response! - Rivierra Blackross
    • @RivierraBlackross on health. If you are satisfied with the answer, do not forget to mark it as correct (checkmark to the left of the answer). - Regent