Question: Inspect the code below. Then select the right answer from the list public class Fraction 9. private int nunerator; private int denoninator; public Fraction(int numerator,

 Inspect the code below. Then select the right answer from the

Inspect the code below. Then select the right answer from the list public class Fraction 9. private int nunerator; private int denoninator; public Fraction(int numerator, int denoninator) ( this . numerator = numerator; this.denominator denoninator: public static void main(String argsl) ( Fraction new Fraction 3,2): Fraction f2 = new Fraction(); a. This will create two valid Fraction objects f and f2. Object f with numerator 3 b. This will create two valid Fraction objects f and f2. Object f with numerator -3, denominator 2. Object f2 with numerator 0, denominator-0 denominator 2. Object 12 however has both numerator and denominator as undefined. This will result in a compile time error. You cannot create 12 as there is no constructor defined for the class that takes 0 parameters This will result in a runtime error. Fraction object f2 will be null at runtime and your program will crash. c. d. 10. Math,pow(2,3) is an example of Static method. i.e Class Math implements a static method called pow. a. True b. False

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!