Updated Java docs
Added return value to method