Skip to content

Instantly share code, notes, and snippets.

@chaitanyamannem
Last active December 23, 2015 14:09
Show Gist options
  • Save chaitanyamannem/6647237 to your computer and use it in GitHub Desktop.
Save chaitanyamannem/6647237 to your computer and use it in GitHub Desktop.
Sample test Java program
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