You can't "cast" directly from an int to a String object. However, you can use various approaches to create a new String object that contains the integer's value as text.
One approach is: String strX = "" + x;
You could do something like this:
int x = 5;
String strX = String.valueOf(x);