private static List<String> getCommonCharacters(String string1, String string2) {
        
        List<String> lstReturnCommons = new ArrayList<String>();
        
        HashMap<String, Integer> unique = new HashMap<String, Integer>();
        
        char[] char1 = string1.toCharArray();
        char[] char2 = string2.toCharArray();
        
        boolean bCheck;
        String subString;
        
        for(int i = 0; i < char1.length; i++)
        {
        	bCheck = true;
        	for(int j = 0; j < char2.length && bCheck; j++)
        	{
        		if(unique.containsKey(char1[i] + "")){
        			bCheck = false;
        			int numberofchecks = unique.get(char1[i] + "");
        			int start = 0;
        			subString = string2;
        			for(int z = 0; z < numberofchecks; z++){
        				start = subString.indexOf(char1[i]);
        				subString = subString.substring(start + 1);
        			}
        		
        			if(subString.contains(char1[i] + "")){
        				unique.put(char1[i] + "", (unique.get(char1[i] + "") + 1));
        				lstReturnCommons.add(char1[i] + "");
        			}        			
        		}
        		else if(char1[i] == char2[j]){
        			bCheck = false;
        			unique.put(char1[i] + "", 1);
        			lstReturnCommons.add(char1[i] + "");
        		}
        	}
        }      
        
        return lstReturnCommons;
    }