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 trialShafiqul Islam
574 PointsI am not sure what is happening here...
I have looked at threads and can't figure out what I'm doing wrong...
String name = console.readLine("What is your name? ");
String adjective = console.readLine("Enter an adjective: ");
String pastTenseVerb = console.readLine("Enter a past tense verb: ");
console.printf("%s really %s this coding exercise %s ", name, adjective, pastTenseVerb);
Shafiqul Islam
574 PointsThank you for your help, John, but that did not work.
john snow
32 Pointsit works
u must compile and run javac appName.java
java appName
1 Answer
andren
28,558 PointsChallenges are very specific about what they want you to do, and doing anything different or more than what is asked for will often lead to failure.
The challenge asks you to create a name
and pastTenseVerb
variable and to print them out. It does not asks you to create an adjective
variable and it does not ask you to print that out.
If you create only the variables asked for and print them out in the way shown like this:
String name = console.readLine("Enter an name: ");
String pastTenseVerb = console.readLine("Enter a past tense verb: ");
console.printf("%s really %s this coding exercise.", name, pastTenseVerb);
Then your code will pass the challenge.
Shafiqul Islam
574 PointsThis worked thank you!!
john snow
32 Pointsjohn snow
32 Pointsyou must run it with terminal or cmd