Update testDict.java

Changed to detect $ and also takes ArrayList as input