class Edderkopp { private String navn; private static int totaltAntallBein = 0; public Edderkopp(String navn) { this.navn = navn; totaltAntallBein += 8; } public String hentNavn() { return navn; } public static int hentTotaltAntallBein() { //Vanlig at statiske variabler hentes ut med statiske metoder return totaltAntallBein; } }