If I have a class as shown below,
import lombok.AllArgsConstructor;
@AllArgsConstructor
class MyClass{
private String one;
private Integer three;
private Integer two;
}
What will be the order of the parameters in the generated constructor? Is it always like this
public MyClass(String one, Integer three, Integer two) {
this.one = one;
this.three = three;
this.two = two;
}
I noticed this is the declaration order in the class itself. But you need to confirm this. Could not find documentation confirming this fact.
Should we not be able to determine the order of the parameters anyway?
source
share