1

I have a package with AbstractTestCase class that I'd like inherit from in all test classes that are in sub-packages, i.e. BaseDaoTestRunner. (See image below)

Project structure

Problem is that I cannot inherit from that class. I know it's some basic mistake, but I'll appreciate every help provided.

Is it because it's in test and not classic src/main?

Jakub Gruber
  • 745
  • 1
  • 11
  • 27

1 Answers1

3

Is it because it's in test and not classic src/main

No. It's because it's in the default package, and you can't import any class from the default package.

Don't, ever, put anything in the default package. Put all your classes under the standard reverse-dns structure: com.mycompany.myproject...

JB Nizet
  • 678,734
  • 91
  • 1,224
  • 1,255