default
keyword
The default
keyword tells the compiler to independently generate the corresponding class function, if one is not declared in the class.
Use the default implementation. Why use it? Default is public
. You can redeclare it under protected
.
We see an example of this in CS247 in lecture 12: