If you want to run a program written in Java, then you will need to install JRE (Java Runtime Environment); if you want to begin developing Java programs, then you also need to install JDK (Java Development Kit) which includes JRE, no matter what operating system you use. This tutorial will be showing you how to install Oracle Java 8 on Ubuntu 16.10 via PPA. PPA (Using a Personal Package Archive (PPA), you can distribute software and updates directly to Ubuntu users. Create your source package, upload it and Launchpad will build binaries and then host them in your own apt repository.) method is easier and faster than manual installation.
sudo apt-get update
sudo apt-get install java-common oracle-java8-installer