This is a very simple example of how the Basic Neural Network Library can be used. This example uses v0.3. The library is a Java version of the one built by Daniel Shiffman in this playlist using the Efficient Java Matrix Library (EJML).
The Neural Network (2 inputs, 4 hidden nodes and 1 output) is being trained for 50.000 iterations. After the training is completed the results are printed to the console. Here's a screenshot of the results:
If you want to see XOR being solved in a visually more appealing way I recommend you checking out this Coding Challenge by Daniel Shiffman: https://www.youtube.com/watch?v=188B6k_F9jU
If you want to learn more about Neural Networks check out these YouTube-playlists:
- Neural Networks - The Nature of Code by The Coding Train (Daniel Shiffman)
- Neural Networks by 3Blue1Brown