Java code update

Adding some methods