Here's a code snippet from spring website.
I know that, If we write any parameterized constructor then the compiler won't add any default constructor. and there's never a need for explicitly adding a default constructor in our class.
But then why here they have written a default one.
@Entity
class Employee {
private @Id @GeneratedValue Long id;
private String name;
private String role;
Employee() {}
Employee(String name, String role) {
this.name = name;
this.role = role;
}