int a=18965;
int b=78521369741;
after concatenation i want ans in primitive integer data types like,
int c=1896578521369741;
i want to know what is the fastest way to do this and what will be the time complexity ?
private static void concat(long a, long b) {
long temp = b;
while (temp > 0) {
temp /= 10;
a *= 10;
}
a += b;
System.out.println(a);
}