Q. How do you declare an array of integers in Java?

A
int[] arr
B
Array arr
C
int arr
D
arr int[]
Solution:

The standard syntax for declaring an array in Java is type[] arrayName; or type arrayName[]; int[] arr; is the most common convention.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!