Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #1829

Re: '{' expected

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!novia!news-out.readnews.com!transit3.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail
From "RedGrittyBrick" <redgrittybrick@THRWHITE.remove-dii-this>
Subject Re: '{' expected
Message-ID <2IadnQowiuyHzO3bnZ2dnUVZ8qminZ2d@bt.com> (permalink)
X-Comment-To comp.lang.java.gui
Newsgroups comp.lang.java.gui
In-Reply-To <1181703020.162653.40640@d30g2000prg.googlegroups.com>
References <1181703020.162653.40640@d30g2000prg.googlegroups.com>
Content-Type text/plain; charset=IBM437
Content-Transfer-Encoding 8bit
X-Gateway time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92]
Lines 51
Date Wed, 27 Apr 2011 15:35:35 GMT
NNTP-Posting-Host 96.60.20.240
X-Complaints-To news@tds.net
X-Trace newsreading01.news.tds.net 1303918535 96.60.20.240 (Wed, 27 Apr 2011 10:35:35 CDT)
NNTP-Posting-Date Wed, 27 Apr 2011 10:35:35 CDT
Organization TDS.net
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.gui:1829

Show key headers only | View raw


  To: comp.lang.java.gui
pacvek@aol.com wrote:
> 
> /*
> MortgagePaymentCalculatorCR1.java
> 
> */
> import java.text.DecimalFormat;
> 
> public class MortgagePaymentCalculatorCR1.java:3:{
> 
> 
> 
> //initialize numerical values
> 	public static void main(String[] args)

snip

> '{' expected      line 7
> '}' expected      line 55
> 

You've allowed yourself to be driven by the error messages without 
really understanding them. I found it a bad idea, as a beginner, to 
write 100 lines of java and then try compiling it.

Start with this - does it compile?

   /*
    * MortgagePaymentCalculator.java
    */
   public class MortgagePaymentCalculator {
       public static void main (String[] args) {
           System.out.println("Mortgage Payment Calculator");
       }
   }

A good way for a beginner to work is to not add any extra code to the 
above until it compiles. Then add no more than two or three lines. Get 
that to compile before proceeding. Proceed in tiny steps.

If it compiles, what do you expect as output? Try running it and see if 
the actual output is as you expect. Don't add new functionality until 
the existing prototype behaves exactly how you expect.

Use indentation to help you see the structure of the program.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

'{' expected "pacvek" <pacvek@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
  Re: '{' expected "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
    Re: '{' expected "pacvek" <pacvek@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
  Re: '{' expected "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
    Re: '{' expected "pacvek" <pacvek@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
      Re: '{' expected "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
        Re: '{' expected "pacvek" <pacvek@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
          Re: '{' expected "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
          Re: '{' expected "pacvek" <pacvek@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
            Re: '{' expected "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
      Re: '{' expected "RedGrittyBrick" <redgrittybrick@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
        Re: '{' expected "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
  Re: '{' expected "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
  Re: '{' expected "kaldrenon" <kaldrenon@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
    Re: '{' expected "Aziz" <aziz@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
      Re: '{' expected "JT" <jt@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
        Re: '{' expected "pacvek" <pacvek@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
          Re: '{' expected "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:36 +0000

csiph-web