Skip to content

Прошу проверить ДЗ4#8

Open
Ekarry wants to merge 1 commit intomasterfrom
HW_4
Open

Прошу проверить ДЗ4#8
Ekarry wants to merge 1 commit intomasterfrom
HW_4

Conversation

@Ekarry
Copy link
Copy Markdown
Owner

@Ekarry Ekarry commented Jun 1, 2021

Перезалила, чтобы не было "мусора"


public HashSet<String> get(String surname) {
if (phonebook.containsKey(surname))
return phonebook.get(surname);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

{ }

public HashSet<String> get(String surname) {
if (phonebook.containsKey(surname))
return phonebook.get(surname);
return new HashSet<>(Collections.singletonList(""));
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

тут просто HashSet()

System.out.println("Уникальные слова: " + wordsSet);

for (String word : wordsSet) {
int number = Collections.frequency(wordsList, word);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

хитро!

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