Simple neural network implementation with Java