Multiple markers at this line @Override workaround

Source: Internet
Author: User

Using Eclipse for project development, if you add @override in front of the method in the implementation class to prompt "multiple markers atThis" error, the problem is described as follows

multiple markers at the
-The method Getstudentbyid (String) of type Studentbeanimpl must override a superclass method
-Implements Mgr.jc.student.service.IStudentBean.getStudentByID


650) this.width=650; "Src=" http://img.blog.csdn.net/20140606212839750?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqvbwf6agfvanvhbg==/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Southeast "style=" Border:none; "/>

Why this problem occurs :JDK1.5 does not support this notation. Implementing an interface method requires overriding the abstract method.

Here's how to solve these problems:

Method 1. Choose Eclipse's Window→preferences→java→compiler and change the Compiler compliance level from 1.5 to 1.6.

650) this.width=650; "Src=" http://img.blog.csdn.net/20140608164118406?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqvbwf6agfvanvhbg==/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Southeast "style=" Border:none; "/>

Method 2. Right-click Project to select the last properties selection to the left of Java compiler, tick the box inside, and change the Java Editor version to 1.6.

650) this.width=650; "Src=" http://img.blog.csdn.net/20140608164201328?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqvbwf6agfvanvhbg==/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Southeast "style=" Border:none; "/>

Method 3. Right-click the JRE System under Project library[javase-1.5]→properties,execution Environment Select "JavaSE-1.6 (JDK1.6.0_10)" and click OK.

650) this.width=650; "Src=" http://img.blog.csdn.net/20140608164235296?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqvbwf6agfvanvhbg==/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Southeast "style=" Border:none; "/>

The above 3 methods can solve the problems mentioned in the topic, according to their own habits to choose the appropriate solution.


Multiple markers at this line @Override workaround

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.