Add java documentation

And remove array init method