Update MainActivity.java

efficiency