String.valueOf()
is a static
method that returns a String
value. Use it like so
String idostring = String.valueOf(System.currentTimeMillis());
System.out.print(idostring);
ido.setText(idostring);
Previously, you were using the valueOf
method but not doing anything with its return value.
idostring.valueOf(System.currentTimeMillis());
Remember that String
objects are immutable. No String
method will ever change the String
internally, it will always return a new String
object.