Search 73,878 tutors
FIND TUTORS
Ask a question
0 0

why would this show this error? and an example on how to fix it? i keep getting five of them

expected
price = Integer.parseInt (inputprice);
 
expected
}
 
cannot resolve synbol
symbol ; method parseInt
location : class homeloan
moths = parseInt (Input Months)
 
possible loss of precision
found : double
required : Int
Interest = annualInterest /12
 
cannot resolve symbol
symbol: variable downpayment
location: class homeloan
loanInt = price,downpayment-tradeIn:
Tutors, please sign in to answer this question.

1 Answer

Dear Daniel,
You don't specify your language. You know, not all computer languages are exactly the same.
Even without knowing what language you're working with, it looks as if you
1) Haven't taken care to specify your variable properties (attributes) completely (thus, annual Interest seems to be arriving as a double precision value, while Interest has been set up as an integer)
2) Haven't taken care of the required syntax (separator symbols such as spaces), so that the string "price,downpayment" becomes meaningless to the interpreter,
3) As in (2), something's "rotten" with "ParseInt (Input Months)" format, such as a space where there needs to be none, a capitalization where there should be none, or none where there needs to be one, (I'm guessing this, because you have "inputprice" as an argument, but also "Input Months")
4) possibly also, a confusion between small L and capital I (with your type font, these both would show up as "l")
So -- computers are picky as to the format of your coding. That may be all it is, when you clean that up, your program will start cranking. Otherwise, you have to troubleshoot whatever else it could be. Programmers spend a lot of their time troubleshooting; get wise now, *document* what you're trying to do with your code (as comments, most languages permit that), and both you and others looking at your code will benefit!
Hope this helps,
-- S.