#quick variable declaration question
1 messages · Page 1 of 1 (latest)
While you are waiting for getting help, here are some tips to improve your experience:
If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.
Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.
Ya
ty
for the constructors is this right?
or do i use "this" here
I'd recommend this. just to help differentiate the parameters and class variables
this.hitPoints
this.pokemonName
etc
U are assigning the right side of the equals sign into whatever is on the left side
Yep
Looks good
how do i do the condition part tho
Its just a big if-else if statement to check the int condition variable
if (condition > x && condition < y) {
} else if (...) {
}
etc
where wld i put that tho?
right under where I declare variables or a new method
that wld be used in the constructors
Closed the thread due to inactivity.
If your question was not resolved yet, feel free to just post a message to reopen it, or create a new thread. But try to improve the quality of your question to make it easier to help you 👍