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
Herb Schildt
Author
Ranch Hand
Joined: Oct 01, 2003
Posts: 239
posted
0
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
Andries Letsela
Greenhorn
Joined: Oct 06, 2003
Posts: 3
posted
0
Thanx i'll try t remember to declare all variables. thanx millions times.