Default class access may trigger some error which the compiler complain about the source.

  • package 1

  • package car;
    class BMW { }

  • package 2

  • package utils;

    class Tool extends BMW {}

    second package creates a new class which extends the “BMW” class. But the first class definition has no any access specifier so the access permissions are set to default. Default access is the package level access which the second package must be in the same package with “car” or you can define “BMW” class with public.