dimanche 18 septembre 2016

Android Studio - How to Display Highest Number when user Enters a number (I used If else still not working)

So I am creating a simple app where user will enter a number and will submit it. Then the app will display that first number as a highest number. Now when user will enter a second number ,if that number is smaller than previous number then app should keep displaying that previous(highest)number else it should display the new highest number. But here the app is displaying the new number even if it is smaller than the previous one.

App displaying the current input as the highest number

Here is my Android studio code :

Android studio code where I have used if-else

I know I am simply assigning temp=userNumberInput which is wrong. But then what else should I do to display the highest number?

Aucun commentaire:

Enregistrer un commentaire