#need help with method and parameters
70 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @hallow quiver! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
different to what?
ok ok
so i want the method of calorie
to be called like used right its giving me an error because calorie is taken as a double
instead of a string
.
i want the method of calorie
to be used
but it wont allow it
because its a double
anyway i can change that
what is a string?
No, we know what's the error
We don't understand what's blocking you from fixing it
the way ive been using it has been working plus im eleventh grade so they havent really taught me the way u guys would call it
idk how
So, the method requires a double
yea
One would expect that to call it right, you need to give it a double
it does
have a double
ye
alright i understand that ok let me just give u like a mini explanation on why it wasnt working for me if thats fine
calorie is being called here right
but the problem is i want the calorie method to run after asking the question on whether they want to know they're calorie deficit
what i intially did was
i have 4 other methods and what i did was ask the question after each method
but that didnt work out
so what i thought was why not make the question its own method
and try to make it run calorie
but it wouldnt work and i had no idea like what to do
ye
(....... Because that's what Scanner.nextDouble() does?)
wait
..... Does it look to you like it doesn't work?
if i do use that would i still be able to like activate the calorie method thing
I think we're derailing
ye
That "first of all" was weird, I don't see why one would say that
So, you told us a story and all, but that story was fairly useless
my fault
The method calorie requires a double so you must call it with a double
That is all
i cant try and make it ask the question or anything
i want to use the calorie method but like how would i if im not doing something to like activate it
Ah you will have to do something like activating it, yes
Something like calorie(2.5), as was said
wdym
just that. Instead of calorie(), calorie(2.5)
yea
that's all
is there like anyhting special with the numbers
5 is kind of rude, but 2 is a nice bloke
theres one more thing
i'd like to ask
actually nvm so the code or the method will activate if i use the number right
sounds like it