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
Hyghner Boyd
Courses Plus Student 40 PointsError reach end of file while parsing
I keep on getting this error.
4 Answers
James Simshaw
28,738 PointsYou 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 }.
James Simshaw
28,738 PointsA 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.
Hyghner Boyd
Courses Plus Student 40 PointsI've checked that corrected it but still have error.https://www.dropbox.com/s/5xe1k443onu3lxo/Screenshot%202015-02-22%2023.50.35.png?dl=0
James Simshaw
28,738 PointsYour 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
}
Hyghner Boyd
Courses Plus Student 40 PointsThank 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
James Simshaw
28,738 PointsYou 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
}
}
Hyghner Boyd
Courses Plus Student 40 PointsThank You. I finally got it to work.
Hyghner Boyd
Courses Plus Student 40 PointsHyghner Boyd
Courses Plus Student 40 PointsThis 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