Results 1 to 2 of 2

Thread: Inheritance

  1. #1
    terahawks is offline Member
    Join Date
    Apr 2010
    Rep Power

    Default Inheritance


    Everytime i write a simple inheritance code i get this error >>>Exception in thread "main" java.lang.Error: Unresolved compilation problem:

    No enclosing instance of type animal is accessible. Must qualify the allocation with an enclosing instance of type animal (e.g. A() where x is an instance of animal).

    Now as am new to java i guess the compiler should show some mercy by putting some sensible warnings. :) so Btw can any 1 tell me wht does the above error means? wht should i do to avoid that nerve burning error?

    Thank you.

  2. #2
    gcalvin is offline Senior Member
    Join Date
    Mar 2010
    Rep Power


    Show us your code, and we can tell you what's going on. Please remember to use CODE tags.


Similar Threads

  1. Inheritance
    By Nerijus in forum New To Java
    Replies: 5
    Last Post: 04-20-2010, 04:47 AM
  2. Inheritance
    By gpio in forum Advanced Java
    Replies: 14
    Last Post: 11-20-2009, 11:41 AM
  3. inheritance
    By itaipee in forum New To Java
    Replies: 6
    Last Post: 01-20-2009, 09:18 PM
  4. Inheritance
    By mew in forum New To Java
    Replies: 1
    Last Post: 12-07-2007, 07:08 PM
  5. Inheritance in GUI
    By Marty in forum SWT / JFace
    Replies: 2
    Last Post: 05-11-2007, 01:54 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