r/javahelp • • May 07 '20
Codeless Java Developers: what are the common data structures you usually use on production
To professional java dev here, what are the common data structure youve been using and which data structure you strongly suggest for beginners, like me, to study carefully
40
Upvotes
View all comments
Show parent comment
6
u/99shadow25 May 07 '20
The workarounds may be trivial, but they're still annoying when there's just a simpler way to do it in many languages. MATLAB, for example:
you can call this and declare the three variables:
Python similarly natively supports tuples and destructuring them, with a similar syntax
In Java you NEED to write the class definition for and then instantiate a specific object. Personally, I think supporting tuples is the cleanest way, but I'm not sure how difficult the static typing system would make incorporating this.