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

Name.java
// I have setup a java.io.Console 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").

NICKOLAS WILSON
NICKOLAS WILSON
468 Points

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