The do not use category continues with the following statement—Optional was not intended to be used for fields and it doesn't implement Serializable.
The Optional class is definitively not intended to be used as a field of a JavaBean. So, do not do this:
// Avoid
public class Book {
[access_modifier][static][final]
Optional<String> title;
[access_modifier][static][final]
Optional<String> subtitle = Optional.empty();
...
}
But do this:
// Prefer
public class Book {
[access_modifier][static][final] String title;
[access_modifier][static][final] String subtitle = "";
...
}