This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark ""extends cannot be resolved to a type" error in Eclipse 3.2" Watch ""extends cannot be resolved to a type" error in Eclipse 3.2" New topic
Author

"extends cannot be resolved to a type" error in Eclipse 3.2

Khuzema Dharwal
Greenhorn

Joined: Dec 11, 2012
Posts: 3
Hi Guys,

I have written a simple program which I am trying to compile in Eclipse 3.2 but while compilation I am getting "extends cannot be resolved to a type" error, following is my code.


Animal.java
========
package Base;

public class Animal {
public void run()
{
System.out.println("I am In Aminal Class");
}
}
========





Test.java
=======
import Base.*;

class Lion extents Animal {

public void run()
{
System.out.println("I am in Lion class");
}
}


public class Test {

/**
* @param args
*/
public static void main(String[] args) {
Animal a=new Animal();
Lion l =new Lion();
Animal ref=new Lion();
a.run();
l.run();
ref.run();
}

}
=======


Any help in this matter is highly appreciated.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60766
    
  65

Check your spelling.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37941
    
  22
There is only one T in extends.
Khuzema Dharwal
Greenhorn

Joined: Dec 11, 2012
Posts: 3
Thanks Campbell and Bear,it was a silly mistake.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: "extends cannot be resolved to a type" error in Eclipse 3.2
 
Similar Threads
Example for Certification book doesnt work
example of dynamic binding
Reference Variable Casting?
Overriding
Help on Inheritance