I am practicing switch statement in java, and I have came across this example in java where I am trying to write a program which will have name of an artist and list of 17 songs of that artist. In one case I have to print out the 16th element of the array and another case I have to print out the last element of the array and by default it will print out everything (artist name and 17 songs). So, far I have declared the array:
public class q7 {
public static void main(String[] args) {
//String[] artist = {"Tahsan"};
//declaring an array that contains 18 elements in total, which includes the name of the artist and 17 tracks
String[] songs = {"Tahsan", "Alo","Irsha", "Odrissho Robi","Prematal", "Aalo", "Nei", "Rodela Dupur","Ke Tumi",
"Alo","Brittalpona","durotto","Brishtite","Durey","Bhalobashar Maane","Tomay Ghire","Kothopokhoton", "Prottaborton"
};
for (String i : songs){
System.out.println(i);
}
switch(){
}
}
How should I start writing the switch statement?