Skip to content

Калькулятор счёта. - #1

Open
MSrescuer wants to merge 3 commits into
mainfrom
dev
Open

MSrescuer wants to merge 3 commits into
mainfrom
dev

Conversation

@MSrescuer

Copy link
Copy Markdown
Owner

No description provided.

Comment thread src/main/java/Main.java Outdated
System.out.println("Hello world!");
Calculator calc = new Calculator();
while (true) {
Scanner scanner = new Scanner(System.in);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше не создавать каждую новую итерацию объект Scanner, сильно нагружает сборщик мусора
И нам хватит одного сканера на проект

Comment thread src/main/java/Calculator.java Outdated
System.out.println("Введите Завершить для подсчёта, или любой символ что-бы добавить еще товар");
String end = scanner.next();
if (end.equalsIgnoreCase("Завершить") || productInput.equalsIgnoreCase("Завершить")) {
System.out.println("Рассчёт завершён.");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants