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

Karie Korporaal
Karie Korporaal
95 Points

Java Basics challenge task 1 I'm getting a secure connection failed error so I can't check my work.

Secure Connection Failed

The connection to the server was reset while the page was loading.

The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the website owners to inform them of this problem.

Any troubleshooting help is appreciated.

Name.java
// I have setup a java.io.Console object for you named console
String firstName = "Karie"
  console.printf('hello my name is Karie")
Karie Korporaal
Karie Korporaal
95 Points

Thanks! I was able to use a different web browser and finish up.

1 Answer

Java requires statements to end with a semicolon.

Also, your quotes are not symmetrical. You can use double quotes for a string "string" or single quotes 'string', but they must be consistent.

String firstName = "Karie";
console.printf("Hello my name is Karie");

In this instance you have created a variable, but haven't used it in your printf call. Variables like to be used.

Consider the following:

String favoriteDrink = "soda";
console.printf("Hello, " + favoriteDrink + "is my favorite drink.");