FAQ: Hello World: Java - Hello Java File!

This community-built FAQ covers the “Hello Java File!” exercise from the lesson “Hello World: Java”.

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

Learn Java

FAQs on the exercise Hello Java File!

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!

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

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

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!

learn about in future lessons. String args is a placeholder for information we want to pass into our program. This syntax is necessary for the program to run but more advanced than we need to explore at the moment

1 Like

This lesson is not explained well in the exercise instructions, specifically the lack of mentioning the semicolon after the close parenthesis of the print line. The semicolon to close out that line of code should be mentioned at the very least, if not highlighted for the beginner. It is very easily overlooked, and then if you click on “show me the correct answer” it simply replaces the code you wrote without showing you exactly what you did wrong.
The explanation of your name replacing “someName” in the instructions was also confusing to me. It gave me the impression that I was literally supposed to enter “someName” and then have another line of code that replaces “someName” with my own name.
The “Hint” section even further confused me by changing “Hello someName” from the instructions to “Howdy World!”… WTF?? Keep things simple, don’t keep changing things! This is the f*cking introduction for people who do not have the first clue about writing code or programming language!
Conclusion:
For a free trial section that’s supposed to entice people to spend their money on the rest of the program, it’s not going to convince many people that their money will be well-spent if they can’t even get through the introduction with a solid understanding of basic code structure.

6 Likes

Java is a very difficult first programming language, given its completely OOP, which means there a lots of concepts to grasp at once.

is this the first programming language you learn?

Yes it is rather difficult- that’s why I made the remarks I made. I feel the instructions need to be made more clear.
I have had an introduction to JavaScript, so I do have some basic understanding of programming language. This is the only reason that I realized I had left out my semicolon which I mentioned above; the tutorial did not guide me in this aspect to help me realize that I had forgotten to add a semicolon. I’m just saying there is room for improvement.

Step 2 won’t let me type. And I need help with it.

1 Like

System.out.printIn(“Hello Diamond!”);

The code above is my own typed code. It was wrong.

JavaProblem%20%232

This code is a solution. But it’s System.out.printIn is different than mine. It has this different type of “I” when I typed the code. Yet, mine is wrong and the solution is correct. Is this some sort of bug or it’s intentional?

1 Like

Why do we use double quotes in system.out.println and what does it denotes?

double quotes are used for a string in Java

what is the function of the semicolon ( ; )?

The semicolon marks the end of a statement.