Java version

This just has static methods I made the javascript version too though