0

I originally had all my .java files under a file named "GravityBallz", but I then created a folder called "src" inside the GravityBallz folder and put them all in there. Now it's giving me an error. I tried restarting but still didn't work.

Thanks

So here is the src folder I added

And here are all the problems I'm getting for all the .java files

  • Can you add more details about what your project looks like, what error you are getting? maybe use some screenshots to show the problem – tHeSiD Jun 22 '20 at 02:01
  • Just added pictures, hope it's clear. Thanks – Space-Rover Jun 22 '20 at 02:06
  • Ah, can you check the solution here https://stackoverflow.com/questions/6997524/the-declared-package-does-not-match-the-expected-package/25220460 – tHeSiD Jun 22 '20 at 02:29

1 Answers1

1

Because you had put your java file in 'src' folder, so you need to add "package src" in every java file.

Steven-MSFT
  • 7,438
  • 1
  • 5
  • 13