Long
public class LongDataType {
public static void main(String[] args) {
long a=10,b=10,c; //declaration of long variables
c=a+b;
System.out.println("Sum= "+c);
//if we need to concatenate 2 long values
c=Long.parseLong(""+a+b);
System.out.println("Concatenated Value= "+c);
}
}
Output:
Sum= 20
Concatenated Value= 1010