Initializing an array of longs

Report a typo

Create an array of longs named longNumbers with three elements 100000000001, 100000000002, 100000000003.

Then output the array.

Use the provided code template.

The long type is used to store big integer values. To indicate a long value, use the L or l literal. Otherwise, it is considered as int.

long twentyTwo = 22L; // L or l is a literal for longs
Write a program in Java 17
import java.util.Arrays;

public class Main {

public static void main(String[] args) {

long[] longNumbers;

System.out.println(Arrays.toString(longNumbers));
}
}
___

Create a free account to access the full topic