org.sonar.l10n.java.rules.squid.S1220.html Maven / Gradle / Ivy
The newest version!
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 access from named ones since Java 1.4.
The following piece of code:
public class MyClass { /* ... */ }
should be refactored into:
package org.example;
public class MyClass{ /* ... */ }
© 2015 - 2025 Weber Informatics LLC | Privacy Policy