Anonymous Array In java can be created using the following syntax. Neith er name of the array nor the size is specified. It also creates a array which can be assigned to reference or passed as a parameter to any function.
Anonymous Array In java can be created using the following syntax. Neith er name of the array nor the size is specified. It also creates a array which can be assigned to reference or passed as a parameter to any function.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as TXT, PDF, TXT or read online from Scribd
Anonymous Array In java can be created using the following syntax. Neith er name of the array nor the size is specified. It also creates a array which can be assigned to reference or passed as a parameter to any function.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as TXT, PDF, TXT or read online from Scribd
In java it is perfectly legal to create an anonymous array using the following s
yntax. new <type>[] { <list of values>}; Anonymous array example new int[]{1,2,3}; The above given example creates a nameless array and initializes it. Here, neith er name of the array nor the size is specified. It also creates a array which ca n be assigned to reference or can be passed as a parameter to any method.