Skip to content

Instantly share code, notes, and snippets.

@wkdalsgh192
Created September 5, 2021 02:28
Show Gist options
  • Save wkdalsgh192/c9bbb002a3967f9d608f8420a616dff1 to your computer and use it in GitHub Desktop.
Save wkdalsgh192/c9bbb002a3967f9d608f8420a616dff1 to your computer and use it in GitHub Desktop.
// Creata a hash map class and put values into the map
Map<String, String> map = new HashMap<>();
map.put("1", "A");
map.put("2", "B");
map.put("3", "C");
// Create a class that only contains a collection.
public class GameRanking {
private Map<String, String> ranks;
public GameRanking(Map<String, String> ranks) {
this.ranks = ranks;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment