posted 14 years ago
int[] a1 = new int[]{2,6,9};
int[] a2 = {2,6,9};
Hi,
{} is considered as array intiallizer.In the second way of initiallization when compilers finds the '{}' then it searches the data types.Since the left hand mention it an int. a2 is intiallized with the int types.
But in the first the data type is explicitly mentioned as int. I hope that it will help u a little.
Thanks.
int[] a2 = {2,6,9};
Hi,
{} is considered as array intiallizer.In the second way of initiallization when compilers finds the '{}' then it searches the data types.Since the left hand mention it an int. a2 is intiallized with the int types.
But in the first the data type is explicitly mentioned as int. I hope that it will help u a little.
Thanks.
Hard work beats talent<br />when talent doesn't work hard.<p> - Tim Notke
Harvinder Singh
Ranch Hand
Posts: 90
posted 14 years ago
Hi Yoshi,
The bytecode are converted to machine specific code by JVM which is one of the way by which java achieve platform independency.Urs suggestion are always invited.
Thanks.
The bytecode are converted to machine specific code by JVM which is one of the way by which java achieve platform independency.Urs suggestion are always invited.
Thanks.
Hard work beats talent<br />when talent doesn't work hard.<p> - Tim Notke

Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |