Skip to content

practical work - Denis Rakhmaev - #32

Open
Demetrien wants to merge 2 commits into
Yandex-Practicum:masterfrom
Demetrien:master
Open

Demetrien wants to merge 2 commits into
Yandex-Practicum:masterfrom
Demetrien:master

Conversation

@Demetrien

Copy link
Copy Markdown

No description provided.

System.out.println("Добавленные товары:");
for (int i = 0; i < orders.size(); i++) {
sum += orders.get(i).price;
System.out.println(orders.get(i).name + " " + orders.get(i).price);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

orders.get(i) повторяется три раза, лучше взять один раз, записать в переменную и использовать её

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