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

What am I doing wrong?

Define a String variable named firstName that stores your name.

Set the value to your name. <--- question
// I have setup a object for you named console
String firstname = "Hallie";

2 Answers

Steven Parker
Steven Parker
195,257 Points

The instructions ask for "firstName" (with a captial "N"), but the variable defined here is "firstname" (lower-case "n").

468 Points

capitalization matters in java. The answer would be String firstName="Hallie";