-
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.
В целом по коду уже понятно что делает функция. Здесь не нужен комментарий.
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.
Логичнее было бы хранить num внутри самого класса Car как переменную и задавать в конструкторе.
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.
Так же логично было бы вынести всю логику по считыванию из класса Car и оставить тут только простой геттер.
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.
try-catch довольно дорогая операция, правильнее было бы использовать hasNextInt()
No description provided.