Modifying scope of member variables

master
Hammy 4 years ago
parent 750fe62438
commit 954e901360

@ -2,9 +2,9 @@ package composite;
public class Song extends SongComponent {
String songName;
String bandName;
int releaseYear;
private final String songName;
private final String bandName;
private final int releaseYear;
public Song(String songName, String bandName, int releaseYear){
this.songName = songName;

@ -4,7 +4,7 @@ import java.util.Iterator;
import java.util.List;
public class SongIterator implements Iterator<SongComponent> {
List<SongComponent> playList;
private final List<SongComponent> playList;
private int currentIndex = 0;
public SongIterator(List<SongComponent> playList) {

Loading…
Cancel
Save