#how to make if statement for an instance
22 messages · Page 1 of 1 (latest)
Hey, @finite lantern!
Please remember to /close this post once your question has been answered!
Hm. Typically you don't. Not in a getter nor in a setter
where do i put it?
My guess is you don't. Why do you want an if?
I suppose you could safeguard against negative radius
i want to return the value postivbe if negative value
Sorry, I don't see you returning anything that you should modify
Okay, with that, then you put it in setRadius
And you call setRadius from the constructor
do i need static void?
void yes, but static needs to go
you were talking about a question?