class Main {
public static void main (String[] args){
long value = 1024 * 1024 * 1024 * 80;
System.out.println(Long.MAX_VALUE);
System.out.
The integer literals are ints. The ints overflow. Use the L suffix.
long value = 1024L * 1024L * 1024L * 80L;
If the data came from variables either cast or assign to longs beforehand.
long value = (long)a * (long)b;
long aL = a;
long bL = b;
long value = aL*bL
Strictly speaking you can get away with less suffices, but it's probably better to be clear.
Also not the lowercase l as a suffix can be confused as a 1.