Java examples for Collection Framework:LinkedHashMap
Remove all values from Java LinkedHashMap
import java.util.LinkedHashMap; public class Main { public static void main(String[] args) { LinkedHashMap lHashMap = new LinkedHashMap(); /*ww w. j a va2 s . c o m*/ lHashMap.put("1","One"); lHashMap.put("2","Two"); lHashMap.put("3","Three"); lHashMap.clear(); System.out.println("Total key value pairs in LinkedHashMap are : " + lHashMap.size()); } }