Download the latest JDK on Oracle's website
Http://www.oracle.com/technetwork/cn/java/javase/downloads/jdk8-downloads-2133151-zhs.html
Select the appropriate system version
The installation process is the next step, but remember the installation directory for your JDK and JRE, because this one configures the environment variables to be used
When the installation is off, proceed as follows
Variable name: java_home
Variable value: C:\Program files\java\jdk*/(* for JDK version number if you are the default path folder, there will be a corresponding version number)
Variable name: CLASSPATH
Variable value:%java_home%\lib;%java_home%\lib\dt.jar;%java_home%\lib\tools.jar;
Double-click the system variable path, add it at the last:;%java_home%\bin;%java_home%\jre\bin (Don't forget to prepend the semicolon to the other path path)
Then confirm that the Java environment is now deployed
As for the Android studio installation is basically the next step, there is nothing to say, select All, allocate memory default, it is best to configure the Java environment before installing Android Studio, so that the Android After Strudio, the software automatically configures the JDK path instead of manually configuring it.
Android's Java Environment deployment