Machine Learning For Java Using Methods