Question: Q1: Does Java support multiple inheritances? Explain in detail. 2 mark Q2: What's the difference between an Abstract Class and Interface in Java? Explain with

Q1: Does Java support multiple inheritances? Explain in detail. 2 mark Q2: What's the difference between an Abstract Class and Interface in Java? Explain with examples. 2 marks Q3: Can a class be a super class and a sub-class at the same time? Give an example. 1 mark Q4: Can we override a method by using same method name and arguments but different return types? Explain with examples 1 mark Q5: What will happen if you put return statement or System.exit () on try or catch block? Will finally block execute? 2 marks - Q6: find the errors in the below code correct them and explain the reasons for correcting these errors 2 marks class Static Test { int multiply( int a, int b){ return a * b; static int add(int a, int b){ return a + b; public class Main { public static void main( String ares ) { System out printIn(" 2 * 2 = " + StaticTest multiply(2,2)); System out printIn(" 2 + 3 = " + StaticTest.add(2,3))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
