SyntaxFix
Write A Post
Hire A Developer
Questions
Use +, the string concatenation operator:
+
ed = (EditText) findViewById (R.id.box); int x = 10; ed.setText(""+x);
or use String.valueOf(int):
String.valueOf(int)
ed.setText(String.valueOf(x));
or use Integer.toString(int):
Integer.toString(int)
ed.setText(Integer.toString(x));