strange error message when compiling


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 7 of 7

Thread: strange error message when compiling

  1. #1
    Join Date
    Jul 2004
    Posts
    92

    strange error message when compiling

    getting a strange error message.

    it's with my System.exit(0);

    my program was working FINE and now it's giving me this error when i compile. and i really can't figure out what it is!!

    BankingSystem.java:202: <identifier> expected
    System.exit(0);
    ^
    BankingSystem.java:204: 'class' or 'interface' expected
    }
    ^
    BankingSystem.java:205: 'class' or 'interface' expected
    ^
    3 errors

    ----jGRASP wedge2: exit code for process is 1.
    ----jGRASP: operation complete.



    i have all the "}" that i need in there. hmmmm. i really don't know what it wants. that System.exit(0) is my last line of code . . . except for 2 more of "}".

    thanks
    crq

  2. #2
    Join Date
    Jul 2004
    Posts
    92
    ok. i just got it.

    nevermind.

    charity

  3. #3
    Join Date
    May 2004
    Posts
    219

  4. #4
    Join Date
    Feb 2004
    Posts
    808
    roflmao... well, charity does begin at home...
    The 6th edict:
    "A thing of reference thing can hold either a null thing or a thing to any thing whose thing is assignment compatible with the thing of the thing" - ArchAngel, www.dictionary.com et al.
    JAR tutorial GridBag tutorial Inherited Shapes Inheritance? String.split(); FTP?

  5. #5
    Join Date
    Feb 2004
    Posts
    808
    Originally posted by crq
    it's with my System.exit(0);
    just remember this:

    jsut because that's what the compiler says is wrong, doesnt mean that it is actually what's wrong.. use the compiler errors as guidance.. if you put too many } in a certain place, the compiler wont tell you that there are too many }, merely that it happened upon something that it was not expecteing (i.e. too many } caused it to think that the end of the class had been reached.. it then found code outside, and tells you it wants to see the word "class" first..

    in this case, it would be erroneous to obey the compiler.. instead you should correct the input that is causing it to come to the wrong conclusion..

    which you no doubt did
    The 6th edict:
    "A thing of reference thing can hold either a null thing or a thing to any thing whose thing is assignment compatible with the thing of the thing" - ArchAngel, www.dictionary.com et al.
    JAR tutorial GridBag tutorial Inherited Shapes Inheritance? String.split(); FTP?

  6. #6
    Join Date
    Jun 2004
    Posts
    12
    try not to use System.exit(0)
    if it is the last instruction you can remove it from
    the program and nothing will happen
    good luck

  7. #7
    Join Date
    Feb 2004
    Posts
    808
    what else would you do to finish a program?
    The 6th edict:
    "A thing of reference thing can hold either a null thing or a thing to any thing whose thing is assignment compatible with the thing of the thing" - ArchAngel, www.dictionary.com et al.
    JAR tutorial GridBag tutorial Inherited Shapes Inheritance? String.split(); FTP?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center