Forums Register Login

did i wrote this "find member" method correctly??

+Pie Number of slices to send: Send
+Pie Number of slices to send: Send
No.

Have you tried it? Does it run?

I haven't tried it, but just eyeballing it, the method "looks wrong."
You have multiple return statements from a single "for" loop.
Your for loop has no proper initialisation, only "head".
The double updating might be permissible syntax (and you can find it in the books) but it is confusing to read. In fact this looks quite inappropriate for a "for" loop.
And you should never have "==true" after "if."
"To do good, you actually have to do something." -- Yvon Chouinard
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 933 times.
Similar Threads
Create your own Simpsons character
Javaranch logo changed?
Overiding Equals Method.
Have problem in JTreeTable Exapnd Collapse.
script and javascript
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 11:38:54.