• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Missing }

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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]
 
Marshal
Posts: 80775
489
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 59
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 80775
489
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic