Skip to content

Commit

Permalink
408: Turn QuantityRange into a record for Java 17+
Browse files Browse the repository at this point in the history
  • Loading branch information
keilw committed Aug 20, 2024
1 parent 85137b3 commit e545e25
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
public class PersonDemo {

public static void main(String[] args) {
var person1 = new Person("John", "Doe", getQuantity(1.8, METRE), getQuantity(80, KILOGRAM));
var height = getQuantity(1.8, METRE);
var person1 = new Person("John", "Doe", height, getQuantity(80, KILOGRAM));
System.out.println(person1);
System.out.println(person1.getFullName());
var min = getQuantity(50, KILOGRAM);
Expand Down

0 comments on commit e545e25

Please sign in to comment.