1. Print duplicate characters from string? sol . public void findduplicaearray() { String str="abbcccdddd"; Map<Character,Integer>mp=new HashMap<>(); Map<Character,Integer>dupl=new HashMap<>(); for(int i=0;i<str.length();i++){ if(mp.containsKey(str.charAt(i))){ int count=mp.get(str.charAt(i)); count++; mp.put(str.charAt(i),count);} else{ mp.put(str.charAt(i),1); } } Set<Map.Entry<Character,Integer>>set=mp.entrySet(); for(Map.Entry<Character,Integer>st:set) { if(st.getValue()>1) { dupl.put(st.getKey(),st.getValue()); } ...