Question: please explain! Consider a method with the following header: public static String triangleType(int a, int b, int c) This method will return a string value

please explain!

Consider a method with the following header:

public static String triangleType(int a, int b, int c)

This method will return a string value indicating the type of triangle that results by having sides of length a, b and c. The possibilities are

  • "equilateral" (all 3 sides same length)
  • "isosceles" (2 sides same length, 3rd side different)
  • "scalene" (all sides have different length).

This method performs no input or output. That is, your code should have no statements containing next(), nextInt(), nextDouble(), print(), println() or printf().

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!