4 ms·
Probably boolean. If you don't see the difference, welcome to Java :D
by normie3000 2y ago
Probably boolean. If you don't see the difference, welcome to Java :D
- Izkata 2y agoAh, but the code already uses boolean instead of Boolean.
- normie3000 2y agoWhoops, so it does. In which case I have no idea what the solution is referring to.
- xgb84j 2y agoNo serious Java code uses booleans to indicate failure or success. It's on the same level as not using a language's standard variable naming scheme. It's not wrong, but something experienced Java developers working on good code will immediately notice. In good Java code you would return either void to indicate side effects or the newly saved user. Exception handling should be done outside the function, because depending on the context you might retry etc. The main idea is to check if people who say they are very experienced understand conventions and have experience with common Java libraries.