What's the use of adding "?" the front of the parameter variable? Example:
public void somar(int n1, Date data?){
}
OR
public void somar(int n1, Date? data){
}
What's the use of adding "?" the front of the parameter variable? Example:
public void somar(int n1, Date data?){
}
OR
public void somar(int n1, Date? data){
}
This interrogation allows the field to receive a null value. For example when declaring something like this:
int i;
By default it will be given a value of zero when we declare:
int? i;
It defaults to null.
Nullable Types
Types that allow null value can represent all values of an underlying type and an additional value null.
Source: link