i tried that with same name and different args what happened is for add method i have to create different data types args and next for sub i have to create different args with sub method name so its...
Type: Posts; User: shu
i tried that with same name and different args what happened is for add method i have to create different data types args and next for sub i have to create different args with sub method name so its...
i just want when i call the parameters with different datatypes in that particular method want to do that particular type of operation m just a beginner of java so dont know how to do that currently...
oki i will try this thank you
no i posted one prog above in that if i called obj.add(anydatatype variable,anydatatype variable) i want to do that operation in that method like if i calle obj.add(2.0,3.0) i want answere in float...
no i want in main method if i send any other datatypes ex:obj(2.0,3.0) i want it convert in the method as generic if i want to put any type of data type parameters when i called t have to convert to...
ublic class MethodsExample {
public void add(int a, int b) {
int add = a + b;
System.out.println("Addtion value=" + add);
}
public void sub(int a, int b) {
int sub = a - b;...