How do i add an array in a file menu, the code below lets me input 10 artists and 10 songs for each artist.
import java.io.*;
public class Music {
public static void main(String[] args) throws IOException
{
BufferedReader stuff = new BufferedReader(new InputStreamReader(System.in));
String inData;
int [] [] MUSIC = new int [2] [10];
for (int counter = 0; counter <= 1; counter++)
{
System.out.print( "Enter Artist: ");
inData = stuff.readLine();
for (int index = 0; index<=9 ;index++)
{
System.out.print( "Enter Record: ");
inData = stuff.readLine();
}
}
System.out.println( "Below is a printout");
for (int counter = 0; counter <= 20; counter++)
{
System.out.print("The nos on Row "+ counter + " are ");
for (int index = 0; index<= 20;index++)
{
}
System.out.println();
}
}
}
I believe that i need to put something like case 1 here and maybe have the code to write the file in a class above the main.