Linked_list.java - import java.util.LinkedList import...

This preview shows page 1 out of 1 page.

import java.util.LinkedList; import Music.Artist; import Music.Song; public class Linked_list { public static void main(String[] args) { LinkedList songs=new LinkedList(); Song s=new Song("Hero","Monster","Romeo save me","Way back home","At my worst"); Artist a=new Artist(); songs.add(s); songs.addFirst("Hero"); System.out.println(songs); singer.addFirst("Singer1"); singer.add("Singer2"); singer.add("Singer3");

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture