Field declarations are composed of three components, in order:
- Zero or more modifiers, such as public or private.
- The field's type.
- The field's name.
however, variable declaration in this post has confused me.
private final firstName;
private final lastName;
I cannot understand why there is no dataType for first two variables declared?
Whereas, 3rd and 4th has?
private final Date birthdate;
private final Address address;
Note:Am learning Java, hence to understand if am missing on anything related to variable declaration.