Download the Java executable file in the official oracle web site, after downloading the required Java requried version for windows 10.
Follow the steps to complete the installation of Java in windows 10.
1. Double click on the downloaded java version executable file, will pop-up the below window
2. Click yes button on the confirmation box.
3. Click next button on the install wizard window