-
Notifications
You must be signed in to change notification settings - Fork 0
Comments
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Рекомендация: - хорошей практикой является делать вызов scanner.close() после того, как сканнер больше не используется. Это необходимо для того, что бы этот объект не потреблял ресурсы, тогда когда это уже не требуется.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
В java принят определенный стиль форматирования кода. Если не вдаваться в подробности, то отформатировать код можно быстрой комбинаций клавиш Ctrl+Alt+L(Windows) или (⌘+⌥+L)(Mac)
src/main/java/Calculator.java
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Рекомендация: В яве и котлине принят нейминг в стиле CamelCase, т.е. лучше переименовть в addMember ( но имя метода должно быть с маленькой буквы)
src/main/java/Calculator.java
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rubles % 100 и rubles % 10 считаются несколько раз, чтоит вынести эти значения в локальные переменные метода
Попытка номер 2 :)