Examlex

Solved

Consider the GetArea Method from the Textbook Shown Below: Public

question 35

Multiple Choice

Consider the getArea method from the textbook shown below: public int getArea()
{
If (width <= 0) { return 0; } // line #1
Triangle smallerTriangle = new Triangle(width - 1) ; // line #2
Int smallerArea = smallerTriangle.getArea() ; // line #3
Return smallerArea + width; // line #4
}
If line#1 was removed, what would be the result?


Definitions:

Related Questions