Forums Register Login

Displaying others variables in a String

+Pie Number of slices to send: Send
How do you convert a variable to a string? eg if i have

String line;
int n = 0;

how can i make it so that line = "0"?
+Pie Number of slices to send: Send

or

or
+Pie Number of slices to send: Send
OR

line = String.valueOf(n);

Which also works with other primatives such as boolean, char etc
Stop it! You're embarassing me! And you are embarrassing this tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 828 times.
Similar Threads
how to parse this string ?
UPloading a Big file
labels, breaks, and continue questions
Collection with 3 keys
Garbage Collection
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 19, 2024 08:05:24.