Question: What is the output of the RightTriangle program? package shapes; A. rt B. irt C. The code does not compile due to line g1. D.
What is the output of the RightTriangle program? package shapes;

A. rt
B. irt
C. The code does not compile due to line g1.
D. The code does not compile due to line g2.
E. The code does not compile due to line g3.
F. None of the above.
abstract class Triangle { abstract String getDescription(); } abstract class IsoRightTriangle extends RightTriangle { // gl public String get Description () { return "irt"; } } public class RightTriangle extends Triangle { protected String getDescription () { return "rt"; } // g2 public static void main(String[] edges) { // g3 final var shape = new IsoRightTriangle(); System.out.print(shape.getDescription()); } }
Step by Step Solution
3.48 Rating (151 Votes )
There are 3 Steps involved in it
Unfortunately the image you provided does not allow for the verification of the syntactic correctnes... View full answer
Get step-by-step solutions from verified subject matter experts
