Back to Intellij Community

ExplicitToImplicitClassMigration

java/java-impl/resources/inspectionDescriptions/ExplicitToImplicitClassMigration.html

2025.3-rc-2509 B
Original Source

Reports ordinary classes, which can be converted into compact source files

Example:

public class Sample {
      public static void main(String[] args) {
          System.out.println("Hello, world!");
      }
  }

After the quick-fix is applied:

void main() {
      IO.println("Hello, world!");
  }

Configure the inspection:

  • Select Replace 'System.out.print()' and 'System.out.println()' with methods from 'java.lang.IO' class to convert these calls to IO methods.

New in 2024.1