Java class “cannot be resolved to a type”

The problem is that TeamLeader appears to be an inner class (hard to tell, your indentation is bad), and since it’s not static, you can’t instantiate it by itself.

You either need to make TeamLeader its own class, or make it a static class and instantiate it as Employee.TeamLeader (or whatever the parent class is, your indentation is really not helpful here).

Leave a Comment

tech