forked from WildCodeSchool/quest-java-collection1
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathThanos.java
More file actions
27 lines (19 loc) · 730 Bytes
/
Thanos.java
File metadata and controls
27 lines (19 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import java.util.*;
public class Thanos {
public static void main(String[] args) {
// TODO 1 : Create an empty heroes list
// TODO 2 : Add those heroes to the list
// name: Black Widow, age: 34
// name: Captain America, age: 100
// name: Vision, age: 3
// name: Iron Man, age: 48
// name: Scarlet Witch, age: 29
// name: Thor, age: 1500
// name: Hulk, age: 49
// name: Doctor Strange, age: 42
// TODO 3 : It's Thor birthday, now he's 1501
// TODO 4 : Shuffle the heroes list
// TODO 5 : Keep only the half of the list
// TODO 6 : Loop throught the list and display the name of the remaining heroes
}
}