FAQ: Hello World - Print Statements

This community-built FAQ covers the “Print Statements” exercise from the lesson “Hello World”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Build Basic Android Apps with Java

Learn Java

FAQs on the exercise Print Statements

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!
You can also find further discussion and get answers to your questions over in #get-help.

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head to #get-help and #community:tips-and-resources. If you are wanting feedback or inspiration for a project, check out #project.

Looking for motivation to keep learning? Join our wider discussions in #community

Learn more about how to use this guide.

Found a bug? Report it online, or post in #community:Codecademy-Bug-Reporting

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

Why does the “One…” statement still end up on the same line as the “Three… Two…” statement when, I used the System.out.println syntax for it???

I was expecting the Sytem.out.println to create and new line for the statement…

1 Like

I was expecting it “One…” to print on another line as well but I realized why it printed on “Three… Two…” instead. The reason for that was because “Three… Two…” was never given the command to print on two separate lines so whatever is printed after that will be included in the “Three… Two…” output as a complete line. Capture

1 Like

It looks like it is not working in that way. Even when I use println it is still remaining in the same line rather than moving to the next one. Ideally as per the theoretical concept when the print is used it will remain on the same line but when the println is used it should move to the next line.

For anyone who’s still confused about the println function, it adds a new line after the (output);


And only after the output.

1 Like

Something that isn’t mentioned (that I could find), but is VERY important, is that commands in this language are case sensitive. As an example: system.out.print(“”) will result in a compiling error vs. System.out.print(“”) will not. Mentioning this prior to the exercises might result in fewer errors by students who currently have to make that realization for themselves.

1 Like