Skip to content

Conversation

@Insaf159
Copy link
Owner

@Insaf159 Insaf159 commented Nov 8, 2023

Привет! Сделал сравнение между ветками своего репозитория.

Scanner scanner = new Scanner(System.in);

double totalCost = 0.00;
void Calculate (){
Copy link

Choose a reason for hiding this comment

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

имя метода Calculate следует начинать с маленькой буквы, чтобы соответствовать общепринятому стилю кодирования Java.

} else {
System.out.println("Текущая сумма добавленных товаров: " + totalCost + " рублей");
}
allProducts += productName + "\n";
Copy link

Choose a reason for hiding this comment

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

Минорное замечание: Использование переменной allProducts для накопления строк неэффективно по памяти, лучше использовать StringBuilder.

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.

3 participants