Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Actually it does return an
int
: https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/OptionalInt.html#getAsInt()If it wasn't the code wouldn't even compile.
It isn't ideal because it return an OptionalInt and not an int