Different ways to create an Object In JAVA