Before compiling and running the programs, ensure that (1) Java is installed on your computer and is added to the PATH environmental variable, and (2) Both Parent.java and Child.java were downloaded to the same folder. You can check that Java is on PATH by opening the command-line or terminal on your computer, and then typing "java". If you see instructions on how to use Java, then Java is installed and is on PATH.
Then, open the command-line or terminal on your computer, compile just the parent program using: javac Parent.java, and then run the parent with: java Parent.
Compiling and running the Parent process, which executes the Child process. Miriam Briskman, CC BY-NC 4.0.
Note: click the GIF amination above to open and play it in a browser window.