Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (3.9k points)

I have recently been thinking about the difference between the two ways of defining an array:

  1. int[] array
  2. int array[]

Is there a difference?

1 Answer

0 votes
by (46k points)
They are semantically identical. The int array[] syntax was only added to help C programmers get used to java.

int[] array is much preferable, and less confusing.

Related questions

0 votes
1 answer
0 votes
1 answer
asked Aug 25, 2019 in Java by Shubham (3.9k points)
0 votes
2 answers

1.2k questions

2.7k answers

501 comments

693 users

Browse Categories

...