Finished Java Portion