org.sonar.l10n.java.rules.squid.S1220.html Maven / Gradle / Ivy
According to the Java Language Specification:
Unnamed packages are provided by the Java platform principally for convenience when developing small or temporary applications or when just beginning development.
To enforce this best practice, classes located in default package can no longer be accessed from named ones since Java 1.4.
Noncompliant Code Example
public class MyClass { /* ... */ }
Compliant Solution
package org.example;
public class MyClass{ /* ... */ }
© 2015 - 2025 Weber Informatics LLC | Privacy Policy