16
Nhiệm vụ
Java Collections,  mức độbài học
Đã khóa
List to Map
Implement the ConvertibleUtil class's convert method. It must return a map whose values are the elements of the passed list, and whose keys are objects obtained by calling the getKey interface method.
16
Nhiệm vụ
Java Collections,  mức độbài học
Đã khóa
Wildcards
Rewrite the generic types in the add method using wildcards. Don't change the logic. Don't leave commented code.
16
Nhiệm vụ
Java Collections,  mức độbài học
Đã khóa
Entry prohibited!
Analyze the classes in the task. Two houses are created in the main method: one for cats and one for dogs. However, currently, when a dog enters the cats' house, a conflict occurs and all of the cats are forced to leave the house (checkConflicts method).
8
Nhiệm vụ
Java Collections,  mức độbài học
Đã khóa
Object generator
Analyze the classes at hand. The Generator class's newInstance method must create an Event for each new call, but the compiler currently complains about the syntax. Redo the Generator class to make the object creation work.