dimanche 2 décembre 2018

Android Studio Java - First array to display index values from second array

I have an “Input box” to enter values to compare with Array “Size1” using an “IF” statement

The Array named “Size1” has these values: 5,10,15,20,25,30

A “Label1” to display values from Array “Size1”

Also, an Array named “Size2” have these values: 105,110,115,120,125,130

A “Label2” to display values from Array “Size2” using the index value from Array “Size1”

Example:

              “Input Box” value is 20

              “Label1” displays value: 20

              “Label2” should displays value: 120

I went as far as “Label1” display value of 20, but I cannot get the code for “Label2” to display value 120.

Please, anyone with the above experience or knowledge help me?

Thanks.

Aucun commentaire:

Enregistrer un commentaire