import java.util.ArrayList; import java.util.Collections; class Hovedprogram { public static void main(String[] args){ Node node1 = new Node("hei"); node1.settNeste(new Node("paa")); node1.hentNeste().settNeste(new Node("deg")); Node iterator = node1; while(iterator != null){ System.out.println(iterator.hentVerdi()); iterator = iterator.hentNeste(); } /* ArrayList bokHylla = new ArrayList(); bokHylla.add(new Bok("lol")); bokHylla.add(new Bok("jk")); System.out.println(bokHylla); Collections.sort(bokHylla); System.out.println(bokHylla); ArrayList mineTall = new ArrayList(); mineTall.add(new Boks(5)); mineTall.add(new Boks(2)); mineTall.add(new Boks(7)); System.out.println(mineTall); Collections.sort(mineTall); System.out.println(mineTall); */ } }