Update README.md

updating ways of obj creation in java