A
A
Andrey Puzov2018-08-05 08:11:00
Java
Andrey Puzov, 2018-08-05 08:11:00

How to store data for comparison with a variable?

Good afternoon. I'm quite new to java. have a GPS coordinate. It must be compared for the shortest distance with a list of other coordinates. The question is that I do not know how to store those other coordinates. Their number is limited (within a hundred. Rather, even 50).
ArrayList ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MaxLich, 2018-08-07
@MaxLich

I suggest HashSet or HashMap. In these structures, searching by elements is fast.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question