Skip to content

Instantly share code, notes, and snippets.

@kabutz
Created September 6, 2014 22:56
Show Gist options
  • Save kabutz/1be813047625c2691828 to your computer and use it in GitHub Desktop.
Save kabutz/1be813047625c2691828 to your computer and use it in GitHub Desktop.
import java.util.*;
public class JavaChampionTest {
public static void main(String... args) {
Map<JavaChampion, String> urls = new HashMap<>();
urls.put(new JavaChampion("Jack"), "fasterj.com");
urls.put(new JavaChampion("Kirk"), "kodewerk.com");
urls.put(new JavaChampion("Heinz"), "javaspecialists.eu");
urls.forEach((p,u) -> System.out.println(u)); // Java 8
System.out.println("URL for Kirk: " +
urls.get(new JavaChampion("Kirk")));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment