Bursary myBursary = new Bursary(studentNumber, birthdate);
System.out.println("Number of yearsEnrolled : " + myBursary.calcYear()); System.out.println("Your age is : " + myBursary.calcAge()); System.out.println("Bursary : " + myBursary.determineBursary());
System.out.println("Do you want to continue: Yes/No"); String ans = console.readLine(); } while(input.equalsIgnoreCase("Yes")); System.exit(0); } }
R Letsela.<br /> A
Joined: Oct 01, 2003
I assume that BursaryTest and Bursary are in two separate files. Right? In BursaryTest, input, which is used in this line while(input.equalsIgnoreCase("Yes")); is not declared anywhere. Remember, in Java, variables must be declared before they are used.
For my latest books on Java, including my Java Programming Cookbook, see HerbSchildt.com
Joined: Oct 06, 2003
Thanx i'll try t remember to declare all variables. thanx millions times.