/** * Creates a new CD, provided its title, group, and song list. * @param title The title. * @param group The group. * @param tracks The song titles. */ public CompactDisc(String title, String group, String... tracks) { this.title = title; this.group = group; this.tracks = Arrays.asList(tracks); // Since CompactDiscs are immutable, the hash value will never change for an instance. this.hashvalue = (new String(title + group)).hashCode(); }