Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case "hardest card":
- Collection<Integer> values2 = hashMap2.values();
- int count = 0;
- for (Integer Value2 : values2) {
- if (Value2 > 0) {
- count++;
- list2.add(Value2);
- }
- }
- if (count == 1) {
- System.out.println("The hardest card is \"" +
- getKeyFromValue2(hashMap2, (Integer) list2.get(0)).get(0) + "\"" +
- ". You have " + list2.get(0) + " errors answering it.");
- list2.clear();
- } else if (count > 1) {
- System.out.println("The hardest cards are \"" +
- getKeyFromValue2(hashMap2, (Integer) list2.get(0)).get(0) + "\"" +
- ", \"" + getKeyFromValue2(hashMap2, (Integer) list2.get(1)).get(1) + "\"" + "." +
- "You have " + list2.get(0) + " errors answering them.");
- list2.clear();
- } else {
- System.out.println("There are no cards with errors.");
- }
- break;
Advertisement
Add Comment
Please, Sign In to add comment