Cause
As it already states that class is inaccessible due to its protection level, it means that the protection level of the constructor or class is not public due to which it cannot be accessed by any other class. Therefore, you need to make it public so it can be accessed by other classes.
Sometimes the class is public but the constructor is not due to which it is still inaccessible. So, ensure that both are public so your issue may get resolved.
Solution
Make the problematic class public e.g.
public class Teacher
instead of
class Teacher
keren dan bagus sangat mempermudah sekali artikel ini gan. Benar-benar meningkatkan wawasan saya.
Salam kenal
LikeLike