hello,
i want to write a program that store subjects and days in two enumerations and their values in rows and coloumn using 2D array. how can i do this ?
see the image below:
http://img718.imageshack.us/img718/3967/sufyan.jpg
So far i've done this,
class EnumProg {
enum Days {Monday, Tuesday, Wednesday, Thursday, Friday}
enum Periods {Period1, Period2, Period3, Period4, Period5}
public static void main (String [] args)
{
String [][] Timetable2A;
Timetable2A = new String [Days.Monday.ordinal()][Periods.Period1.ordinal()];
}
}
i really dont know how to use enumeration and arrays together and how to store values in arrays..i don't have any example program thorugh which i can learn this.
Can anyone give me the idea to do this ?