Results 1 to 3 of 3

Thread: Compile Error

  1. #1
    jo15765 is offline Member
    Join Date
    May 2012
    Posts
    42
    Rep Power
    0

    Default Compile Error

    I have this code
    Java Code:
    public static void main(String[] args)
    {
    Scanner scnr = new Scanner(System.in);
    int x = -1;
    int y = -1;
    
    while(x<0 || x>1000)
    {
    //Do Stuff
    }
    while (y<0 || y>1000)
    {
    //Do Stuff
    }
    
    //this is my problems
    Circle cirlcle = new Circle(x, y, radius);
    System.out.println(circle.area());
    System.out.println(circle.circumference()):
    }
    The constructor circle is undefined
    Area() is undefined for circle
    Circumference is undefined for circle
    Last edited by jo15765; 06-04-2013 at 07:15 PM.

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

    Default Re: Compile Error

    The compiler is usually correct. But we can't help you because we can't see your Shape class. My guess is that it has none of the methods that the compiler states it doesn't have.

    Please post the Shape class.

  3. #3
    jo15765 is offline Member
    Join Date
    May 2012
    Posts
    42
    Rep Power
    0

    Default Re: Compile Error

    You are right...thank you for that reminder. I had to rename a class when importing it in due to naming conflicts so I needed to rename it in the code as well. Thank you.

Similar Threads

  1. Compile error :(
    By Astralogic in forum New To Java
    Replies: 10
    Last Post: 07-22-2013, 02:26 PM
  2. i get this error during compile
    By Bibin in forum New To Java
    Replies: 1
    Last Post: 12-24-2011, 08:43 AM
  3. compile error
    By missmara77 in forum New To Java
    Replies: 1
    Last Post: 10-31-2011, 07:48 PM
  4. Compile Error - Please Help!!
    By AJ2009 in forum New To Java
    Replies: 10
    Last Post: 01-04-2009, 03:59 PM
  5. compile error
    By dirtycash in forum New To Java
    Replies: 6
    Last Post: 12-12-2007, 06:00 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
  •