Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "John B. Matthews" Newsgroups: comp.lang.java.programmer Subject: Re: another error with @Override with another code Date: Sat, 07 Dec 2013 00:26:39 -0500 Organization: The Wasteland Lines: 37 Message-ID: References: <52a1867c$0$2911$e4fe514c@news2.news.xs4all.nl> <796271a4-11a0-402c-85ff-0f91556c8e7a@googlegroups.com> <06afa354-5858-4359-9e29-6f2b1846e628@googlegroups.com> <33f33be7-61be-411f-9dee-704118dfb44f@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 7 Dec 2013 05:26:39 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="d17dee34624b7b363488e8f2f4ab0076"; logging-data="12054"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/cVw736Osz19uNB7NvWllCJfWI9x7bbsg=" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 In-Reply-To: <33f33be7-61be-411f-9dee-704118dfb44f@googlegroups.com> Cancel-Lock: sha1:/tEJ+snux7RUfiD0QJoaw0HRYF8= Xref: csiph.com comp.lang.java.programmer:26756 On 12/6/13, 12:21 PM, Y HA wrote: > got this error with this code which also uses @Override > > # javac MySuperClass.java > MySuperClass.java:11: error: incompatible types > @Override > ^ > required: Annotation > found: Override > 1 error > > > > public class MySuperClass { > > public void doTheThing() { > System.out.println("Do the thing"); > } > } > > > class MySubClass extends MySuperClass{ > > @Override > public void doTheThing() { > System.out.println("Do it differently"); > } > } I see no error on the platform cited up-thread. You may have adventitious classes in the classpath. Start with a clean build; failing that, scrutinize your IDE's cache and your platform's java.ext.dirs. -- John B. Matthews trashgod at gmail dot com