When a developer compiles a program, the compiler may find one or more errors in the java code. I am trying to make a java compiler errors list, and this is the first error in the series:
There is no default constructor available in org.code.programmers.StickerTracker
This error appears when you define in a superclass only the no-args constructor with a private visibility. Check the following example:
1 2 3 4 5 6 7 8 9 |
class StickerTracker { private StickerTracker() { } } class PersonalStickerTracker extends StickerTracker { } |
Solution: change the visibility of the superclass constructor from private to public.