• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Error - ; expected

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,


Cut and paste your error please...
 
Holly Leery
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Don't destroy the earth! That's where I keep all my stuff! Including this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic