E
E
evgenyt20002020-12-05 13:11:20
Java
evgenyt2000, 2020-12-05 13:11:20

How to access individual elements of a pair?

Good afternoon!
It is not possible to access the elements of a pair individually.
There is a list

ArrayList<Pair<String, String>> words = new ArrayList<>();

It is filled in the second grade and used in the third.
Deriving/accessing a pair is not a problem through a get(i) list in a loop.
And it doesn't work on its own.
It's just that many things need to be done on the first element of the pair or the second.
It seems that if the first element is a space, then remove it from the list, etc.

I will be glad for any help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2020-12-05
@zagayevskiy

get(i).first/getFirst()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question