Results 1 to 2 of 2
  1. #1
    Java Noobie is offline Member
    Join Date
    Mar 2011
    Posts
    1
    Rep Power
    0

    Default Im having trouble with.......

    I have just starting working on how to use Arrays in Jcreator.

    I keep getting this error.....

    Operator cannot be applied to double int

    Here is my code......

    import java.io.*;

    public class Arrays_2
    {

    public static void main(String[] args)
    {
    double average;
    double [] finalGrades = {85.8, 93.7, 76, 88.5, 100, 91.3};


    }
    }


    Plz help

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,337
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by Java Noobie View Post
    import java.io.*;

    public class Arrays_2
    {

    public static void main(String[] args)
    {
    double average;
    double [] finalGrades = {85.8, 93.7, 76, 88.5, 100, 91.3};


    }
    }
    Is this the piece of code that is giving you trouble? It compiles fine for me.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. trouble animating
    By rippon in forum AWT / Swing
    Replies: 3
    Last Post: 11-30-2010, 03:22 PM
  2. GUI Trouble
    By rvgsd in forum New To Java
    Replies: 2
    Last Post: 03-07-2010, 12:10 AM
  3. mouseListener trouble please help!
    By linux1man in forum AWT / Swing
    Replies: 6
    Last Post: 06-03-2009, 01:57 AM
  4. Here comes trouble... :-)
    By sargehendricks in forum Introductions
    Replies: 1
    Last Post: 04-23-2009, 03:18 PM
  5. having some trouble
    By Unknown1369 in forum New To Java
    Replies: 13
    Last Post: 07-21-2008, 11:52 PM

Posting Permissions

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