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 trial

Java Java Basics Getting Started with Java Strings, Variables, and Formatting

Carlos Salcedo
Carlos Salcedo
1,788 Points

i did everything that was asked, i dont know if i am introducing right the variable in the console.printf

i dont think there is an error, maybe there is another way of doing it that i havent seen?

Name.java
// I have setup a java.io.Console object for you named console
String firstname = "carlos";
console.printf(firstname);

2 Answers

andren
andren
28,558 Points

Your code is fine, but for these challenges you have to name things exactly as the instructions specify. They ask you to make a variable called firstName, you have named it firstname (without a capital N). That difference is enough to make your code be marked as wrong. In programming differences in capitalization matter quite a bit.

This is also true for strings by the way, when a task asks you to print out a certain message the message you write has to match the instructions perfectly, even minor typos will be enough to get your code marked as wrong.

Carlos Salcedo
Carlos Salcedo
1,788 Points

yes, totaly right thanks alot i did just that and finally got threw. thanks for the input.