Converts the specified integer to its string representation.
Parameters: value - the integer.
Returns: the integer converted to a string
(** I prefer to use String.valueOf over, Integer.toString() **)
1. In the MainActivity.java file, add a Toast which displays the value of String.valueOf(1);
Toast.makeText(getBaseContext(), String.valueOf(1), Toast.LENGTH_LONG).show();
2. Compile and run!
3. The display results will be (as a string): 1
Resources:
http://stackoverflow.com/questions/3335737/integer-tostringint-i-vs-string-valueofint-i
2. Compile and run!
3. The display results will be (as a string): 1
Resources:
http://stackoverflow.com/questions/3335737/integer-tostringint-i-vs-string-valueofint-i