Vijay Kumari
What is the difference between int[] a and int a[] in Java?
By Vijay Kumari in Java on Sep 17 2019
  • Arbab Arain
    Sep, 2019 17

    Both will Do same Work

    • 2
  • Sahi Repswal
    Jul, 2021 24

    There is no difference in these two types of array declaration.

    • 1
  • Aman Gupta
    Jul, 2020 16

    There is no such difference in between these two types of array declaration. It’s just what you prefer to use, both are integer type arrays.

    • 1
  • Deepak Sharma
    Sep, 2023 3

    In this query, int [] a and int a[] is no difference between this syntax

    • 0
  • Bhagyashri Kadam
    Apr, 2021 30

    There is no difference in functionality between both styles of declaration. Both declare array of int. But int[] a keeps type information together and is more verbose so I prefer it.

    • 0
  • U Day
    Sep, 2019 19

    They are semantically identical. The int a[] syntax was only added to help C programmers get used to java. int[] a is much preferable, and less confusing.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS