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.
Challenge: Create a class that represents a data object
From the course: IntelliJ IDEA Community Edition Essential Training
Challenge: Create a class that represents a data object
(upbeat music) - [Narrator] In this challenge I'll ask you to build a new Java class named invoice. The invoice will have a single constructor. Now, if you're new to Java that just means it's a method that has the same name as the class itself and this class should have three private fields, a title which is a string, an instance of the Java date class where the name of the field is date and a value which will be a double value. Then when you call system..println and you pass that invoice in you should see output that looks like this. This will be part of a two string method. Now, as I showed in a previous video you can generate a lot of that code automatically using intelligent ideas generate tools. Start with a brand new project then create this invoice class and I'm not going to show you what it looks like yet. I'll show you that in the solution and then add this code in the main method to create an instance of the invoice…
Contents
-
-
-
-
-
Create new packages, classes, and interfaces1m 30s
-
Generate boilerplate code2m 49s
-
Reformat code and optimize imports4m 34s
-
Navigate code and find files2m 39s
-
Refactor code4m 1s
-
Create and use live templates2m 34s
-
Store code in scratch files2m 22s
-
Challenge: Create a class that represents a data object1m 9s
-
Solution: Create a class that represents a data object3m 10s
-
-
-
-
-
-