Results 1 to 3 of 3

Thread: ( or [ expected

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2005
    Posts
    9

    ( or [ expected

    Hi all,

    Just wondering if anyone could help. I'm writing a small mulichoice quiz progrmam but i can't seem to get an arraylist to hold my questions. I recieve

    Code:
    ( or [ expected
    from the class that creates the arraylist to hold the questions. I can't seem to spot what i've done wrong.


    Code:
    import java.util.ArrayList;
    
    public class Quiz
    {
        public Quiz()
        {   
            Questions = new ArrayList<String>();
        } 
    }
    Regards,
    Last edited by pthug; Nov 28th, 2005 at 04:42 PM.

  2. #2
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    Re: ( or [ expected

    First off, Questions is not declared. Or am I missing something?

    Edit: Or I assume you're using Java compiler lower than 5, yet you're using a Java 5 compliant syntax.
    Last edited by nebulom; Nov 28th, 2005 at 09:10 PM.

  3. #3
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: ( or [ expected

    The problem is: you are using old version of java, you must have java 1.5
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

Posting Permissions

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



Click Here to Expand Forum to Full Width