Computer Science, asked by Manikbhatia447, 1 year ago

What can be inherited from derived class to base class?

Answers

Answered by yash197911
0

\huge\boxed{\mathfrak{\blue{\underline{\underline{ANSWER:}}}}}

PUBLIC STATIC VOID MAIN(STRING ARGS[]) can be in herited as in

//author :@Dark_Panther(Yash Raj)

import java.util.*;

public class Calculator

{

public static void main(String args[])

{

Scanner sc = new Scanner(System.in);

double a,b,c,d,e,f;

System.out.print("Enter two integers : ");

a=sc.nextDouble();

b=sc.nextDouble();

c=a+b;

d=a-b;

e=a*b;

f=a/b;

System.out.println("Sum="+c);

System.out.println("Difference="+d);

System.out.println("Product="+e);

System.out.println("Quotient="+f);

}

}

Similar questions