Results 1 to 2 of 2
  1. #1
    janedoe is offline Member
    Join Date
    Sep 2015
    Posts
    15
    Rep Power
    0

    Default error: ')' expected

    Greetings,
    This error is driving me crazy...

    Java Code:
     System.out.println(" \t \t \t \t \t \t  King Saud University (KSU) - Riyadh");
    WTH

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,004
    Rep Power
    34

    Default Re: error: ')' expected

    The Strings one each line must start and end with a '. Continued Strings are joined by using the + operator:
    Java Code:
      String long = "first line"
                       + " second line";
    NOTE: You need to copy the FULL text of the error message and paste it, not just one line of it.
    The message should show the source with a ^ under the location of the error.
    Here is a sample from the javac compiler:
    Java Code:
    TestSorts.java:138: cannot find symbol
    symbol  : variable var
    location: class TestSorts
             var = 2;
             ^
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. ';' expected error
    By anmol_b in forum New To Java
    Replies: 12
    Last Post: 07-09-2013, 11:40 AM
  2. ';' expected error
    By name in forum New To Java
    Replies: 19
    Last Post: 12-23-2011, 08:09 AM
  3. Error: ')' expected
    By baltimore in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 06:32 AM
  4. My error is: ')' expected
    By silvia in forum New To Java
    Replies: 1
    Last Post: 07-18-2007, 04:49 PM
  5. MSG ERROR: : expected
    By Marty in forum New To Java
    Replies: 1
    Last Post: 05-31-2007, 02:21 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
  •