Getting "non-static method cannor be referenced from a static context here

12 Views Asked by At

So I know why this error appears in general, but I can't figure out why it appears here. This is my code:

private void ausfuehrenFunktion(int funktion) {
artikel = new Artikel(einlesenArtikelnummer(), einlesenBezeichnung(), einlesenBestand(), einlesenPreis());
                Lager.legeAnArtikel(artikel);
}


public void legeAnArtikel(Artikel artikel){
        lager[stelle] = artikel;
        stelle++;          
    }
0

There are 0 best solutions below