#Can someone help me with this Methods exercise?

1 messages · Page 1 of 1 (latest)

thorny warrenBOT
#

<@&987246399047479336> please have a look, thanks.

thorny warrenBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

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.

autumn geyser
#

Which part are you struggling with?

#

You're checking the size of the straws

#

You declare a method

#

The function will take 3 parameters and return a Boolean

#

Yup

#

Int isn't a type in Java

#

Seems like something you can Google

#

"Java Int", look at some examples

thorny warrenBOT
#

Detected code, here are some useful tools:

Formatted code
javaif (a == b && a != c) System.out.println("is a triangle")
autumn geyser
#

It doesn't need to be equal

#

You just need to make sure that the sum of 2 of the sides isn't less than the other side

#

So yeah, you could make use of if

#

if the sum of 2 sides is less than the remaining side

#

If you say it that way, you can tell an if would be useful

thorny warrenBOT
#

Detected code, here are some useful tools:

Formatted code
sumAB = a + bif (sumAB <= c) System.out.println("Is not a triangle")
autumn geyser
#

There ya go, you're getting the hang of it

thorny warrenBOT
#

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 👍