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 trialApoorv Saxena
63 Pointshelp plz i cant find the mistake
find mistake in the code.
// I have setup a java.io.Console object for you named console
string firstName = "apoorv";
console.printf("hi apoorv %s\n",firstname);
console.printf("apoorv is learning java\n",firstname);
1 Answer
chase singhofen
3,811 PointsHi Apoorv,
the 'S' should be capitolized ex. String not 'string' also, firstname variable should be 'firstName' in each console.printf statement.
PS- don't use the single quotation marks i used these to help.
console.printf("apoorv is learning java\n",firstname); --> also, replace your firstName with %s in each console.printf statement. %s replaces your having to type your name. you can put it in there anyways but you def. need the %s %s should be first in 1st console.printf statement.
good luck!
chase singhofen
3,811 Pointschase singhofen
3,811 PointsHi Apoorv,
the 'S' should be capitolized ex. String not 'string' also, firstname variable should be 'firstName' in each console.printf statement.
PS- don't use the single quotation marks i used these to help.
console.printf("apoorv is learning java\n",firstname); --> also, replace your firstName with %s in each console.printf statement. %s replaces your having to type your name. you can put it in there anyways but you def. need the %s %s should be first in 1st console.printf statement.
good luck!