In Java, it's common practice to organize files into folders (known as "packages") to maintain a structured project. When you place a file inside a folder, Java expects you to declare the package at the beginning of the file.
To resolve this, add a package declaration at the beginning of your file. The format for this declaration is:
package [folder_name];
Replace [folder_name] with the name of the folder where the file is located.