I have two lists ( not java lists, you can say two columns)
For example
**List 1** **Lists 2** milan hafil dingo
Assuming hash1 and hash2
hash1
hash2
List< String > sames = whatever List< String > diffs = whatever int count = 0; for( String key : hash1.keySet() ) { if( hash2.containsKey( key ) ) { sames.add( key ); } else { diffs.add( key ); } } //sames.size() contains the number of similar elements.