Skip to content

Java2 Homework3#8

Open
Ren4t wants to merge 2 commits intomasterfrom
branch2-3
Open

Java2 Homework3#8
Ren4t wants to merge 2 commits intomasterfrom
branch2-3

Conversation

@Ren4t
Copy link
Owner

@Ren4t Ren4t commented Sep 30, 2020

No description provided.

Copy link

@OKrylov OKrylov left a comment

Choose a reason for hiding this comment

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

В целом по ДЗ все отлично, но обратите внимание на замечания



}
void get(String name){
Copy link

Choose a reason for hiding this comment

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

больше print, чем get. Старайтесь, чтобы имена методов соответствовали их действиям

Comment on lines +15 to +26
for (String word : words) {
count = 0;
for (String l : list) {
if(word.equals(l)){
count++;
}
}
if(count == 0){
list.add(word);
}
}
System.out.println(list.toString());
Copy link

Choose a reason for hiding this comment

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

коллекция Set идеально подходит для такой ситуации, нам нужно просто её проинициализировать, за уникальность значений она возьмется сама

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