Results 1 to 4 of 4
  1. #1
    vince425 is offline Member
    Join Date
    Oct 2008
    Posts
    3
    Rep Power
    0

    Default Illegal Start of Expression

    Hi!

    I just started Java. tried copying the code(Exercises) that was in the book.
    when I compiled, it was getting an error : " Illegal start of expression "
    But the I made sure it was copied correctly from the book.

    What are the possible causes for having this?

    when I tried debugging the code, it points to a line after " // end of while " .
    the succeding line where the error is : private static void makeDeposit () ;

    how can I correct this?
    help me pls.

    :confused:

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    Could you post your code?

    Remember, when posting your code, please use code tags so that your code will retain its formatting and be readable. To do this, you will need to paste already formatted code into the forum, highlight this code, and then press the "code" button at the top of the forum Message editor prior to posting the message. Another way is to place the tag [code] at the top of your block of code and the tag [/code] at the bottom, like so:

    Java Code:
    [code]
      // your code block goes here.
      // note the differences between the tag at the top vs the bottom.
    [/code]

  3. #3
    vince425 is offline Member
    Join Date
    Oct 2008
    Posts
    3
    Rep Power
    0

    Default

    Hi Fubarable!

    Thanks for replying.
    I'll try posting it later. after i'm done w/ my work shift.
    I really want to learn & master Java.

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    In your code you have a method call, makeDeposit.

    Is it define as,

    Java Code:
    private static void makeDeposit () ;
    If so, it's incorrect. You cannot added ; sign at the end, except it's an abstract method.

Similar Threads

  1. illegal start of expression
    By razmyasdfg in forum CLDC and MIDP
    Replies: 2
    Last Post: 07-27-2008, 11:44 PM
  2. Illegal Start of an Expression
    By David55 in forum CLDC and MIDP
    Replies: 8
    Last Post: 11-02-2007, 10:11 PM
  3. Replies: 9
    Last Post: 08-08-2007, 08:16 PM
  4. Illegal start of expression
    By gabriel in forum New To Java
    Replies: 2
    Last Post: 08-01-2007, 06:09 PM
  5. Illegal Start of an Expression
    By David55 in forum CLDC and MIDP
    Replies: 0
    Last Post: 04-20-2007, 06:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •