There are mainly two ways to write Java on android . In website app In android app In website app There are so many web app where you can compile a…