![]() Private static final long serialVersionUID = 5462223600l Įmployee.java has it's own file and it compiles on it's own import java.io. heres a look at the error: File: C:UsersKatieDocumentsHomeworkCellPhoneProgram. 3.0 Error-Prevention Tips These tips contain suggestions for exposing bugs and removing them from your programs many describe aspects of Java that prevent. Public class Employee implements Serializable I have these classes in seperate files and have tried with them in a package and out of a package. Im getting this error: ElectricCar.java: Line 6: constructor Car in class Car cannot be applied to given types Im not sure why Im getting this because the ElectricCar constructor isnt referencing the superclass (other than the class extending it). If that doesnt work, maybe delete the project. I'm not looking for someone to do it for me, just a pointer in the right direction. If you get this error with Dagger Android dependency injection, first just try and clean and rebuild project. I've read that my problem is the arguments in my constructor, but nothing seems to fix it. 3 Answers Sorted by: 9 Your problem is this line here: Building b new Building () // Creates the object b Your constructor is set up to take two arguments, a double and an int, but you pass neither. I have been reading various articles about serialisation, I am a newb to Java, I have searched for my errors, but despite reading a lot, I fail to understand why my program won't compile and what I need to change.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |