Update Class.java

Added the type attribute to the init function.