• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Khuzema Dharwal
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check your spelling.
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is only one T in extends.
 
Khuzema Dharwal
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Campbell and Bear,it was a silly mistake.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic