If i pass an integer value as String argument to some function, where i need to add it to integer value. How can i typecast argument from String to integer before adding. The problem i faced is
public int Sum(String str1,String str2){
int sum = str1+str2; //What i need to do here?
return sum;
}
public Static void main(String args[]){
obj.sum("123","456");
}
public int Sum(String str1,String str2){
int sum = str1+str2; //What i need to do here?
return sum;
}
public Static void main(String args[]){
obj.sum("123","456");
}