Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Java concatenate two int

public static Integer concatenateInt(int a, int b) {
        if(b < 0){
            b *= -1;
        }
        int proxyB = b/10;
        a *= 10;
        for (; proxyB > 0; proxyB /= 10) {
            a *= 10;
        }

        if(a < 0){
            a -= b;
        } else {
            a += b;
        }
        return a;
    }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Java #concatenate #int
ADD COMMENT
Topic
Name
6+5 =