0
public class LearnJava {

    public static void main(String[] args) {
        name = "Susan";
        System.out.println(name.toUpperCase());
    }
}

Error occurred during initialization of boot layer java.lang.module.FindException: Error reading module: D:\java\JavaTutorial\bin Caused by: java.lang.module.InvalidModuleDescriptorException: LearnJava.class found in top-level directory (unnamed package not allowed in module)

Haris
  • 4,130
  • 3
  • 30
  • 47

1 Answers1

-1
public class LearnJava {

    public static void main(String[] args) {
        String name = "Susan";
        System.out.println(name.toUpperCase());
    }
}
Holzer
  • 59
  • 8
  • 1
    While change is necessary, it doesn't address problem that the OP is asking about. (Hint: read the entire question, not just the code.) – Stephen C Jan 28 '21 at 07:53
  • Please describe your solution, not just drop the code – betontalpfa Jan 28 '21 at 10:33
  • The community encourages adding explanations alongisde code, rather than purely code-based answers (see [here](https://meta.stackoverflow.com/questions/300837/what-comment-should-i-add-to-code-only-answers)). – costaparas Jan 28 '21 at 13:52