Q
Q
Quad_Tree2015-12-27 13:48:51
Java
Quad_Tree, 2015-12-27 13:48:51

What is the best way to store a lot of data for quick access?

The bottom line is that I sat down to implement the inventory. There are many items that contain data such as (String name, String des, int id, int price). What is the best way to store a lot of such items (as classes, multidimensional arrays, just arrays, or in collections)? Despite the fact that objects with all their properties must be prepared in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
cthulhudx, 2015-12-27
@cthulhudx

hashmap

T
Taras, 2015-12-27
@TyLeRRR

It all depends on whether you just keep them or do something with them. but you still need the Collections API anyway. Map or LinkedList, depending on your needs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question