-
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.
Лучше внести этот принтлн в метод correctedPersonsNumber, потому что это часть той логики
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 принята конвенция, согласно которой методы принято называть глаголами, см. https://www.oracle.com/java/technologies/javase/codeconventions-namingconventions.html
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.
Лучше давать переменным более говорящие названия
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.
Такие подряд идущие println можно объединить в один.
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.nextInt(), nextDouble()
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.
В этой программе уже было использовано ключевое слово static, можно также сделать эти методы тоже static, так как они служебные. Тогда нам не нужно будет создавать экземпляр класса IsItANumber для вызова его методов
First request on this 2nd sprint's project