Hello,
First I'll say thankyou for viewing this post, secondly thankyou if you can assist me with this java compile error, it will be most appreciated.
Ok so there are 4 files.
- main file:
JavaQuiz.java <---- this file cannot be edited.
- class files:
Question.java
QuestionLibrary.java
Student.java
The Question.java, QuestionLibrary.java and Student.java files are in a package togther called au.edu.uow.csci213quiz (each dot represents a new folder directory). JavaQuiz.java is on the desktop.
As far as I know there is no problem with the package.
Here is the error I'm getting while trying to compile JavaQuiz.java
Code:
C:\Users\name\Desktop>javac JavaQuiz.java
javaQuiz.java:(line50): error: incompatible types
Question question = new QuestionLibrary();
required: Question
found: QuestionLibrary
1 error
Here is the code in JavaQuiz.java file:
Here is the code inside the Question.java file:
Here is the code inside the QuestionLibrary.java file:
As you can see QuestionLibrary does nonthing yet. I am lost as to why there is a problem.
JavaQuiz does not call QuestionLibrary If I am not mistaken, yet there is a 'incompatiable error'.
Most of the code is also unrelated to the error, such as the code in student.java (which works fine atm).
So thats all of the important info I can give to help I think.
Thanyou in advance.