Question: OOP2 /java Considering the RationalNumber Class, what does the following code segment produce when executed? public RationalNumber() { this.numerator= 1; this.denominator= 1; This constructor initializes
OOP2 /java

Considering the RationalNumber Class, what does the following code segment produce when executed? public RationalNumber() { this.numerator= 1; this.denominator= 1; This constructor initializes the Rational Number object to O This constructor initializes the RationalNumber object to 1 This constructor is invalid syntactically(i.e., has a syntax error) This constructor may produce a division by zero runtime error None of the above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
