update code

Main.java updated to insert all types of values
Query.java added