The Pi4J project includes many more comprehensive examples included both when installed locally and available in the Pi4J Exmaples project at GitHub.
The Pi4J Examples project can be found on GitHub at this location: https://github.com/Pi4J/pi4j-v1/tree/master/pi4j-example/src/main/java
When Pi4J is installed using the Debian package installer, Pi4J will also include all examples in the "/opt/pi4j/examples" path on your local file system.
If you have not already downloaded and installed the Pi4J library on the RaspberryPi, then view this page for instructions on where to download and how to install Pi4J:
Download & Install Pi4J