title: Creating data structure in Java
body: <p>I'm wondering if there is a good way to create a new data structure in Java that avoids creating new class file. According to <a href="https://stackoverflow.com/questions/14794196/creating-struc-like-data-structure-in-java">this post</a>, the Java's equivalence to struct in <strong>C</strong> is simply a class. However I find it redundant to create a whole new file for a class that simply have a couple of public fields, ex: x,y coordinates of a point. In <strong>C</strong>, the data structure can be defined within the .c file that uses it, which is a lot more simple. Is this actually the only way in Java? </p>