public class Hovedprogram { public static void main(String[] args) { String[] arr = {"Hei", "paa", "deg!"}; Node forste = new Node<>("Hei"); forste.settNeste(new Node<>("paa")); forste.hentNeste().settNeste(new Node<>("deg!")); // Sett inn sist: Node current = forste; while (current.hentNeste() != null) { current = current.hentNeste(); } current.settNeste(new Node("Siste node")); // Print liste: current = forste; while (current != null) { System.out.print(current.hentVerdi() + " "); current = current.hentNeste(); } } }