In Java he have a one-size-fits-all tool: a class. For most problems you solve in Python with a tuple or a dictionary, in Java you write a custom class, with instance variables, constructors, getters, and setters. So when in Java, be prepared to write some boilerplate.
As far as data structures, the default ones are ArrayList
, HashSet
, and HashMap
. There are sorted versions: TreeSet
and TreeMap
—when you need them, they are very useful.
When you need close-to-the-metal performance, you'll resort to arrays.
In Java you also enjoy the built-in concurrency, and then it gets complicated: there are performant options like ConcurrentHashSet/Map
and also synchronized wrappers around plain collections: Collections/synchronizedSet/Map/List
(these are methods that return a wrapping object).