For example,
int a = 6;
String b = (String) a; //does not work
Need to receive
b = "6"
Answer 1, authority 100%
int a = 6;
String b = String.valueOf (a);
Answer 2, authority 11%
1st way simple
int a = 4;
String b = a + "";
2nd method
int e = 6;
String tt = String.valueOf (e);