Please take time and answer it correctly and properly.
4. a) What is meant by inheritance in OOP? Why does not Java support multiple inheritance? b) What will be the output of the following Java code? // filename Main.java class Main { public static void main(String args[]) { System.out.println(fun()); } } int fun() { } return 20; c) Consider a class called Fraction that has two data members, an int numer and an int denom (for the numerator and denominator), write the following Java code: Write a constructor that accepts values for the numerator and denominator as arguments.
Please take time and answer it correctly and properly.
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am