Skip to content

Commit 2c6f98f

Browse files
authored
Update Person.java
Change methods order
1 parent bacb7be commit 2c6f98f

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

  • fast-json/src/main/java/com/baeldung/fast_json

‎fast-json/src/main/java/com/baeldung/fast_json/Person.java‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ public Person(int age, String lastName, String firstName, Date dateOfBirth) {
3030
this.dateOfBirth = dateOfBirth;
3131
}
3232

33+
@Override
34+
public String toString() {
35+
return "Person [age=" + age + ", lastName=" + lastName + ", firstName="
36+
+ firstName + ", dateOfBirth=" + dateOfBirth + "]";
37+
}
38+
3339
public int getAge() {
3440
return age;
3541
}
@@ -61,10 +67,4 @@ public Date getDateOfBirth() {
6167
public void setDateOfBirth(Date dateOfBirth) {
6268
this.dateOfBirth = dateOfBirth;
6369
}
64-
65-
@Override
66-
public String toString() {
67-
return "Person [age=" + age + ", lastName=" + lastName + ", firstName="
68-
+ firstName + ", dateOfBirth=" + dateOfBirth + "]";
69-
}
7070
}

0 commit comments

Comments
 (0)