Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
William Juste
7,822 PointsMethod that Ben mentions.
Around the 1:15 sec mark of the video. Ben mentioned something about a double.toString method for setting the text for the temperatureLabel. Does anyone know how to use that, rather than then ( + "") way he gets it to a String value?
3 Answers

Sai Sushanth Durvasula
2,759 Pointstry String.valueOf(num) where num is of double datatype. Hope this helps!

William Juste
7,822 PointsI did-
private void updateDisplay() {
String tempString = String.valueOf(mCurrentWeather.getTemperature()) ;
mTemperatureLabel.setText(tempString);
}
and it seems to be working- Thanks!

William Juste
7,822 PointsNo idea why my comments come out looking like that, btw

Nicolas Hampton
44,638 PointsBelow each comment and answer box is a link to the markdown cheatsheet. That better explains how to get code windows to show in your comments, like you accidentally did here.

William Juste
7,822 PointsOHH I SEE
String firstName= "Nicolas";
console.printf("Thanks for your help, %s!", firstName);