• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Missing }

 
J perez
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all Im new to java and eclipse but this is something I have wanted to do so i started looking around and some how I found this forum with the error I was having only mine is a little different, can you please help I want to continue learning !!!

screenshot attached
java error.PNG
[Thumbnail for java error.PNG]
 
Campbell Ritchie
Sheriff
Pie
Posts: 50278
80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Please don’t add a new question to an old thread; I have created a new thread. Please copy-and-paste code; screenshots are much more difficult to read.
 
Kristjan Toots
Ranch Hand
Posts: 59
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error is quite straightforward: Insert another "}" to complete class body.
You have to have brackets in pairs - if there is "{" you'll need "}" as-well to end the block.

The bracket you have in the end will pair up with the main "{". Insert another one to pair up with the class "{".
 
Campbell Ritchie
Sheriff
Pie
Posts: 50278
80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the original poster worked it out, but I didn’t copy the whole thread over correctly. Sorry.

I recommend learning to write code differently from a letter. I am surprised there wasn’t a warning before attempted compiling, and that the IDE didn’t insert the {} correctly paired automatically. I would also recommend you don’t use an IDE if you are still at the beginner’s stage.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic