| Author |
Type mismatch: cannot convert from Override to Annotation
|
Sasha Ruehmkorf
Ranch Hand
Joined: Mar 29, 2007
Posts: 115
|
|
I am using Eclipse and I always get the above mentioned message when hoovering the mouse over the word Override. I don't have a clue what to do... class ObjektMitFinalize{ int [] intArray = new int[100]; @Override protected void finalize(){ } }
|
 |
Burkhard Hassel
Ranch Hand
Joined: Aug 25, 2006
Posts: 1274
|
|
Hi Sasha, I had the same problem also. In my case I had a class named "Override" that caused the error. The class was in the same package. Yours, Bu. [ April 01, 2007: Message edited by: Burkhard Hassel ]
|
all events occur in real time
|
 |
Sasha Ruehmkorf
Ranch Hand
Joined: Mar 29, 2007
Posts: 115
|
|
That was the problem. Thank you!!!
|
 |
shakthi balaji
Greenhorn
Joined: Oct 13, 2010
Posts: 3
|
|
|
Thanks! That saved my time.
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32675
|
|
|
Common problem; the answer is never to create a class with the same name as a class in the package you are importing. That implicitly includes the java.lang package.
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32675
|
|
|
Alternatively, you can use the fully‑qualified names of the classes imported.
|
 |
 |
|
|
subject: Type mismatch: cannot convert from Override to Annotation
|
|
|