Neural Network implemented in java