/*1. Program to add two integers and two float numbers. When no arguments
are supplied, give a default value to calculate the sum. Use function
overloading.*/
public class SimpleTesting{
int add(int a, int b) {
return a+b;
}
float add(int a, int b,int c) {
return a+b+c;
}
public static void main(String[] args) {
SimpleTesting test = new SimpleTesting();
int val1 = 10;
int val2 = 20;
int val3=100;
int result1 = test.add(val1 ,val2);
int result2 = test.add(val1 ,val2,val3);
System.out.println("int default resutl1 : "+ result1);
System.out.println(" int resutl2 : "+result2);
}
}