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

Error reach end of file while parsing

I keep on getting this error.

4 Answers

You now need to match up the { for the class with a } at the end of your code. Always remember there should be the same amount of { as there are }.

This is the video tutorial I was simply following and keep getting errors. https://www.dropbox.com/s/rkiws4ecdrue123/Screenshot%202015-02-23%2008.14.42.png?dl=0

A lot of the times when this error occurs, it means you have an opened code block. In other words, you have a { without a corresponding } somewhere in your code.

Your code doesn't appear to have any { or } left in it. Those symbols are necessary to segment code in a way that Java will understand how to use it. You should have a set surrounding your class and a set surrounding your function.

In example for a function:

public void someFunction() {

// code here

}

Thank for your help so far. I've tried what you describe. This my error.https://www.dropbox.com/s/lfs2aqcpdvrmn1z/Screenshot%202015-02-23%2000.36.51.png?dl=0

You are still missing the final } at the end of the code. Your code current is setup as

public class Introductions {
     public static void main(String[] args) {
          //Your function's code
     }

when it should have a final } closing the { from the class like

public class Introductions {
     public static void main(String[] args) {
          //Your function's code
     }
}

Thank You. I finally got it to work.