Last active
December 23, 2015 14:09
-
-
Save chaitanyamannem/6647237 to your computer and use it in GitHub Desktop.
Sample test Java program
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
package com.devchaitu18.ipj.collections.maps.usecases; | |
import java.util.HashMap; | |
import java.util.Map; | |
public class MapContains { | |
/** | |
* @param args | |
*/ | |
public static void main(String[] args) { | |
HashMap<String, String> map = new HashMap<String, String>(); | |
map.put("member", "m"); | |
map.put("job", "j"); | |
if(map.containsKey("member")){ | |
System.out.println("Key found member"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment