Neural network algorithm and implementation based on Java language