From the course: IntelliJ IDEA Community Edition Essential Training

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Solution: Create a class that represents a data object

Solution: Create a class that represents a data object

From the course: IntelliJ IDEA Community Edition Essential Training

Start my 1-month free trial

Solution: Create a class that represents a data object

(upbeat music) - [Instructor] In the previous video, I gave you the challenge of creating a class that represented an instance of a data object. The name of the class would be invoice, and it would have a title, a date, and a value. Now, before I create the class I want to show you how I've configured this project. I'll go to the menu and select File and Project Structure. And I've set my project SDK at Java 15, and also the project language level at Java 15. Now, I'll go to my com.example package, right-click and choose New, Java Class and I'll name the class Invoice and I'll set it as a class. Now, I'll declare my private fields. I'll type private and then the data type and then I'll set the field name as title. Then I'll do the same thing. And this time it's going to be an instance of the Java Date class. And this is the Date class from java.util. When I select that class, the import is added at the top and then the…

Contents