This series of guides and tutorials will focus on learning Java using the textbook Java: An Introduction to Problem Solving & Programming Fifth Edition. The book is listed on Amazon used currently going for $12.69 due to the fact that this is an older edition of the text.
Full source code from my examples are posted on GitHub at https://github.com/JK-Designs/Java-Exercises. The repository answers the 'programming projects' section at the end of each chapter of the text. The questions themselves are listed in the comment headers of each project and the projects are named according to chapter and problem number. For example, the first problem from chapter one will be named 1.1 and the first problem from chapter two would be named 2.1.
For a simplified workflow I highly recommend using GitHub Desktop (https://desktop.github.com/). It currently supports Windows and Mac OS but the GitHub team seems to be discussing a possible Linux build after version 1.0 goes into production. Using GitHub and the Desktop app you can create your own personal fork of my examples that can be modified to suit your needs.
The Java Development Kit (JDK)
The standard edition of the Java Development Kit, otherwise known as the JDK, is necessary for creating and running Java programs. Also available for download are demonstration projects and various samples of Java code.
The latest edition can be found at: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
The textbook specifies using the Windows command line to compile and run your projects. This will require an optional part of the installation process outlined in the official documentation (http://docs.oracle.com/javase/8/docs/technotes/guides/install/windows_jdk_install.html) to be completed. Setting the PATH variable to include the JDK's executables will ensure that you can call up the compiler with a single command. The exact steps quoted from the official documentation are as follows...
To set the PATH variable permanently, add the full path of the jdk1.8.0\bin directory to the PATH variable. Typically, this full path looks something like C:\Program Files\Java\jdk1.8.0\bin. Set the PATH variable as follows on Microsoft Windows:
- Click Start, then Control Panel, then System.
- Click Advanced, then Environment Variables.
- Add the location of the bin folder of the JDK installation to the PATH variable in System Variables. The following is a typical value for the PATH variable:
This file path may be different depending on your installation location and version of Windows. Check your installation path for the JDK binaries before tampering with the PATH variable. You can check that the PATH is set correctly by testing the 'java' and 'javac' commands. They should call up a description summary of the command if the PATH has been set correctly.