FAQ: Hello World: Java - Java Review: Putting It All Together

Community%20FAQs%20on%20Codecademy%20Exercises

This community-built FAQ covers the “Java Review: Putting It All Together” 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 Java Review: Putting It All Together

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!

i think the error you get is quite descriptive: TimeLine.java:18: error ‘{’ expected

it tells you what is missing, as well where you forgot the curly bracket.

1 Like

Hello,

follow op question to this screenshot. I get this error a lot, but codeacademy still excepts the solution, just as you see there. What is up with that? Also I don’t see how you can tell from this error where curly brackets are missing.

22

Where am I going wrong?

step 3 of the instructions is:

Inside of the curly braces for the main() method

i don’t see curly brackets for your main method

1 Like

I’m not getting any errors within the terminal, but I continue to get the red text informing me of how to use “single line comment syntax”. Currently, I am stuck on the third problem for this page. Any tips?

The word “task” you lack “s”

want to thank you all who do some hints for us noobs.
it is worth

1 Like

Review.java:2: error: ‘;’ expected
public static void main(String args) //The main method executes the tasks of the class
^
1 error
it gave me the go ahead… but also an error.
take your time answering. im gonna step away for a bit. ive got a headache.
Edit: im asking if im supposed to have an error and if not what is wrong. my code:
public class Review {
public static void main(String args) //The main method executes the tasks of the class
system.out.println(My first Java program from scratch!)
Review
}

Was this step 2 of the instructions? If so, I am having the same issue:

declaring a method still required {}, even if the body of the method is empty

1 Like

Thanks!
This was not highlighted in the step. I have sent feedback.


Can some one please explain what is going on?

what do you mean by declaring?

Your class name does not match the file/module name.

1 Like

Oh ok, I got it running. Thanks

can someone tell me what I did wrong? I followed the instructions correctly

nvm i got it working. turns out you needed whitespaces hahaha my bad

Here is the working solution I MISSED the curly braces for my main method! finally sorted

public class Review {
public static void main(String args){
//main method
System.out.println (“My first Java program from scratch!”);
}

}