Give some Java programming examples with respect to-
object,
class,
encapsulation,
polymorphism ,
and inheritance.
Answers
Answered by
1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class Adder {
Static int add(int a, int b)
{
return a+b;
}
static double add( double a, double b)
{
return a+b;
}
public static void main(String args[])
{
System.out.println(Adder.add(11,11));
System.out.println(Adder.add(12.3,12.6));
}
}
Similar questions