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! While you're at it, check out some resources Treehouse students have shared here.
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 trialRaluca Voicu
505 PointsString variable compiling in Java
Hi! Raluca here!:) I'm a beginner who wants to learn Java coding. Please tell me WHAT code line am I missing? Thank you!
// I have setup a java.io.Console object for you named console
package java.io.Console
public class Introduction {
public static void main(String[] args) {
Console console = System.console() ;
String firstNameAndWill = "Raluca learns to code in Java";
}
}
1 Answer
Jennifer Nordell
Treehouse TeacherHi there, Raluca Voicu ! Something to note about code challenges is that much of the surrounding code is already provided for you in the background. You do not need a main
or even a class declaration. All that has been set up for you already. Secondly, you must name the variable exactly as it specifies which is firstName
.
The solution to this challenge is simply one line of code.
String firstName = "Raluca";
Hope this helps!
Raluca Voicu
505 PointsRaluca Voicu
505 PointsI appreciate your answer, Jennifer Nordell! Wish you having a nice day further! :)