logo CodeStepByStep logo

addNumeric

Language/Type: Java string return
Related Links:

Write a method named addNumeric that accepts as parameters two strings representing base-10 integers and returns a string representing the base-10 integer sum that would result from adding those two integers. For example, the call of addNumeric("123", "456") returns "579" and the call of addNumeric("42", "3079") returns 3121.

You may assume that both strings will be non-empty and will consist entirely of the characters from 0-9. Do not assume that the numbers represented would fit into the numeric range of type int nor long. Do not use Java's built-in conversion methods to convert strings into integers, nor a large-integer library such as BigInteger.

Method: Write a Java method as described, not a complete program or class.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.