I am trying to print a value from the table,I am not coverting my Char and I can't get a clean compile...what am I doing wrong?
public class Schedule
{
public static void main(
String[] args) throws Exception
{
String[][] id =
{ {"CIS 115 Th 1:30"},
{"CIS 120 Mo 10:30"},
{"CIS 125 We 9:30"},
{"CIS 130 Mo 8:30"} };
char course;
int x, y, courseId;
System.out.print("Enter course ID-number 0-3, ");
course = (char)System.in.read();
for(x = 0; x < 4; ++x)
for(y = 0; y < 1; ++y)
courseId = Character.getNumericValue(course);
if(courseId == id[x][y])
System.out.println("The course name, day and time are " + id[x][y]);
}
}