The declared package "" does not match the expected package

Source: Internet
Author: User

Today I started using Eclipse to learn Java, mainly because I feel that I already know the command line command line, each time to knock, to switch directories, compared to waste time.

And there's a lot of eclipse shortcuts, so much to forget.

And this eclipse is not as scary as it used to be, and I don't know why, maybe it's because of an Android development.

I do not know why I was afraid, seems to have encountered a lot of problems, it is estimated that the Java is also unfamiliar with the reasons.


Sun Weichen's book Java Object-oriented programming

Eclipse error detected when testing P47

The declared package "" does not match the expected package


To find out, a Web page said what the directory is not right, I do not know how to recall the package declaration statement

Sure enough, plus

Package Com.testPackage.hai;

Right away.

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.