• Post Reply Bookmark Topic Watch Topic
  • New Topic

reached end of file while parsing error........I found the open curly bracket  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found the open curly bracket (public class Clients extends javax.swing.JFrame {  ) and found that it does not have a closing curly bracket.

Can anyone help me to find where to place the closing curly bracket without throwing more errors?

See below coding:
 
Sheriff
Posts: 4935
334
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
RobertWw Wilson wrote:I found the open curly bracket (public class Clients extends javax.swing.JFrame {  ) and found that it does not have a closing curly bracket.

Can anyone help me to find where to place the closing curly bracket without throwing more errors?
If there are errors you have them already, regardless if there is or there isn't a closing brace.
However, if you know that you have class opening brace and don'e have closing for that, you need to put it at the very end of code. If you think you missed somewhere else, you need to workout yourself, this is something you can do yourself by looking where your class starts and where supposed to end; where your method starts and where supposed to end; ...
 
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
RobertWw Wilson wrote:I found the open curly bracket (public class Clients extends javax.swing.JFrame {  ) and found that it does not have a closing curly bracket.

Can anyone help me to find where to place the closing curly bracket without throwing more errors?


This is an incorrect way at trying to fix the issue.

Keep in mind that the compiler isn't perfect when encountering compiler errors. Once it reaches an error, it has to guess at what you mean, and keep compiling in search for more errors. This means that it is possible for a compile error to hide other errors. This means that it is possible for a compile error to create errors that don't exist. And of course, it can do both, and create a list of completely wrong errors.

So, this is why, until you get more experience, to always work on the first errors on the list. The compiler errors at the end of the list may be completely wrong. And certainly, the count of errors, may be completely wrong.

You need to fix the cause of the compiler error, and to do that you need to understand what is causing the compiler error. "Fixing" it by minimizing the count of compiler errors (as a resultant effect) is *not* the correct way to resolve this.

Henry
 
Marshal
Posts: 56610
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wwwwelcome to the Ranch
I am surprised you got that error because you appear to have code from NetBeans. If you are using a text editor, you shou‍ld write backwards, as in the links shown in this old post.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!