First of all, Java is not used in any means for any purpose for Analytics or Data Science. The mainly used platforms are R or Python.
Between the two, Python is more preferred because it has a lot of libraries which can be used for visualization, analytics, etc. Comparatively R has fewer libraries supported. Also for the wee reason that it is easier to code in Python compared to R.