java BigDecimal in one line


  • 0
    D

    import java.math.BigDecimal;
    public class Solution {
    public String addStrings(String num1, String num2) {
    return new BigDecimal(num1).add(new BigDecimal(num2)).toString();
    }
    }


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.