java - Error: No enclosing instance of type zad_II_1 is accessible -
this question has answer here: java - no enclosing instance of type foo accessible 5 answers i'm learning abstract classes in java , have little problem error: no enclosing instance of type zad_ii_1 accessible. must qualify allocation enclosing instance of type zad_ii_1 (e.g. x.new a() x instance of zad_ii_1). wrong? code: public class zad_ii_1 { abstract class pacjent{ string imie; pacjent(string imie){ this.imie=imie; } abstract string nazwiskoo(); abstract string podajchorobe(); abstract string podajlek(); string nazwisko(){ return imie; } string choroba(){ return podajchorobe(); } string leczenie(){ return podajlek(); } } class ch