Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Lew Newsgroups: comp.lang.java.help Subject: Re: New to java, Help please ;)? Date: Mon, 19 Sep 2011 16:12:59 -0700 (PDT) Organization: http://groups.google.com Lines: 41 Message-ID: <11446343.1337.1316473979676.JavaMail.geo-discussion-forums@prfz40> References: Reply-To: comp.lang.java.help@googlegroups.com NNTP-Posting-Host: 2620:0:1000:437c:224:d7ff:fe69:5838 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1316473980 21513 127.0.0.1 (19 Sep 2011 23:13:00 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 19 Sep 2011 23:13:00 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2620:0:1000:437c:224:d7ff:fe69:5838; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T User-Agent: G2/1.0 X-Google-Web-Client: true Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.help:1066 markspace wrote: > Andre Ramseier wrote: >> public class Main >> { >> public static void main (String [] args); > ^^^ >> } >> } >> >> Getting error when compiling: >> not expected at code: System.out.println ("Please enter >> your score: "); >=20 > The version you posted is missing an open brace where I've indicated abov= e. That would be instead of the semicolon at the end of the 'public static voi= d main' line. 'main' is a method (what some other languages might call a "function"). A = method definition begins with an optional access specifier, 'public' here. = Then it has an optional 'static'. Then the return type, 'void'. Then the= name of the method, 'main', followed by parentheses containing arguments, = if any.=20 After the closing parentheses you need a method body surrounded by curly br= aces, "{" and "}". Put it all together: public static void main(String [] args ) { // method body here } This is covered in the Java tutorials: and for this question particularly,=20 --=20 Lew