when a user searches for a song to play, the songs variable (which is a List) gets changed and since songs is passed by reference it also gets changed in the home page as a result when user returns back to search page, the songs variable only has the list of songs that matched the previous search.
when a user searches for a song to play, the
songs
variable (which is a List) gets changed and sincesongs
is passed by reference it also gets changed in the home page as a result when user returns back to search page, thesongs
variable only has the list of songs that matched the previous search.