Please take time and answer it correctly and properly.

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Please take time and answer it correctly and properly.

Post by answerhappygod »

Please take time and answer it correctly and properly.
Please Take Time And Answer It Correctly And Properly 1
Please Take Time And Answer It Correctly And Properly 1 (98.65 KiB) Viewed 8 times
3. a) What will be the output of the Java program? class First { int i = 10; public First (int j) { } } System.out.println(i); this.i j* 10; } class Second extends First { public Second(int j) { super (j); System.out.println(i); this.i j* 20; public class MainClass { public static void main(String[] args) { Second n = new Second (20); System.out.println(n.i); } } b) Write a java program to create an abstract class named Shape that contains two integers and an empty method named printArea(). Provide three classes named Rectangle, Triangle and Circle such that each one of the classes extends the class Shape. Each one of the classes contain only the method printArea() that prints the area of the given shape. c) What is difference between abstract class and interface in Java?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply