Update Parser.java

Updated with constructor