From the course: Data Science for Java Developers

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

More data formatting

More data formatting

- [Instructor] My preferred way of representing data, generally, is to represent it as something called data objects. So the idea here with data objects is that you create a very lightweight class that only contains member variables, and then you use lists that contain instances of that class in order to represent your data. So in order to show you what I mean, what I'm going to do here is define a new person class. So inside our data formatting class that we're using for these videos, I'm going to say static class person, and this person class is going to be our lightweight class that only has member variables. That's how we're going to say something like public final integer ID. And we are going to make these final because we're not going to need to change them. And we'll say public final string name, and we'll say public final Boolean likes pizza, for example. And then of course, we can generate a constructor for this…

Contents