Just starting learning java today and can\'t seem to figure this out. I am following the tutorial on learnjavaonline.org which teaches you a few things and then asks you to
An easy and ugly way to do this would be to use String.valueOf
for each numerical value.
As in:
String output = h + String.valueOf(three); // + etc...
Edit
morgano's approach is perfectly valid as well - +1 for that.
On a more general topic, you might want to use String.concat
for String
concatenation, or even better, a StringBuilder
object.
This SO page contains a lot of info you can use on the matter.