The declared package "" does not match the expected
package "demo" Java(536871240)
Move this file to a named package.sonarlint(java:S1220)

You may get the above Compilation time error while working with Java on various IDEs (Eclipse, IntelliJ, VS Code, or Android Studio)
Fix:
You are missing the package for this class, all you need to do is have the add for the package before import and you should be all good.
Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!