So, I have a database that returns 2 integer-type values (1 = USD
and 3 = GHS
). I wrote an API PHP code that returns the integer values and would like to convert their corresponding String (USD
and GHS
) in Java.
The line of code that returns the int in java (android studio) is
creditnav.setText(SharedPrefManager.getInstance(MainActivity.this).getUser().getCurrency());
I would like to return the result of the above line of code into their corresponding strings.
How do I go about it? Any help would be much appreciated.