Java:the hierarchy of the type is inconsistent error

Source: Internet
Author: User

Reason One

  • In a class/interface of inheritance (extends)/implementation (implements), other jars on which this class/interface depends cannot be relied upon or referenced in this class.
  • Example: Class A Inheritance (extends) class B, import the Com.jixue.dna.ui.portal.TaskUtil class in Class B, and Class A is not dependent on the Com.jixue.dna.ui.portal.jar package, so error.

Reason Two

  • In a class/interface, the dependent jar package relies on another jar package, and the class/interface cannot rely on another jar package, so there is an error.
  • Example: Class A relies on Com.jixue.dna.ui.portal.jar, and Com.jixue.dna.ui.portal.jar relies on Com.jixue.dna.service.task.jar, and class A is not dependent on the Com.jixue.dna.service.task.jar package, so error.

Java:the hierarchy of the type is inconsistent error

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.