Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error - ; expected

 
Holly Leery
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I keep getting an error saying ; expected on lines 14 and 15, I don't see why that is. My code is below. Any ideas why this is happening, seems strange to me unless I am missing something so simple.

 
Sean Magee
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Compiles fine for me, but when pasting it, code is completely horizontal.
May want to check

public Home (int house, String street, String town, int yearConstructed, int propertyTax, String family, OurDate movedIn)

I do not think you can do that, but do not take my word for it.
 
Jimmy Die
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,


What does

mi = o;

mean?

What's o?
 
Holly Leery
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My mistake that is supposed to be a "zero." Thanks for catching that. Ok I see what I did with the error and how to fix it I changed the 14 and 15 lines to:

because you cant have int and OurDate, but now I get a bunch errors regarind OurDate and cannot find symbol....why is this? Thank you for all your help. I am struggeling to get this done.
 
Holly Leery
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is this happening because it thinks class OurDate doesn't exist? I made a class OurDate am I not putting them together correctly?
 
Jimmy Die
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,


Cut and paste your error please...
 
Holly Leery
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Home.java
Home.java:7: cannot find symbol
symbol : classOurDate
location: pacakge insy.java.hw7
import insy.javahw7.OurDate;
^


Thats the error yet there is like 13 of them.
 
Holly Leery
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Home.java
Home.java:7: cannot find symbol
symbol : class OurDate
location: pacakge insy.java.hw7
import insy.java.hw7.OurDate;
^

...sorry for my mistake in the above one
 
Jimmy Die
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Before I knew how to cut and paste from dos command prompt, I used to type it. I'm not sure if this is the case for you, but incase it is, you right click in the dos console, select 'mark', then drag your screen text you copy, then press enter. Then paste in the post are with ctrl + v;... If this is not the case for you then never mind my extra trivia...
 
Holly Leery
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thought this might help a little...here are all my codes:











 
Jimmy Die
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,


I think you have some class extention problems.

Count the number of constructor parameters in Home's constructor call to super(). They do not match up with your extended classes number of args in it's constructor.


Good luck and good night

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic