Can anyone tell me why in Java Array is using square brackets?
Because JLS defines such a syntax, for creating arrays:
An array type is written as the name of an element type followed by some number of empty pairs of square brackets []. The number of bracket pairs indicates the depth of array nesting.
while for ArrayList they use angle brackets?
Because, ArrayList<T>
is a Java class, which has a constructor, and braces a.k.a round brackets are used to invoke a constructor and create an object of a particular class.
P. S. These two are completely different concepts.