Created
September 6, 2014 22:56
-
-
Save kabutz/1be813047625c2691828 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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