Loading...
Java

Anonymous Arrays

Array created with no name are called anonymous array. The main objective of this array is for instant use (i.e., just for one instant use).
Example:
1. new int[] {5,10,15,20};
2. new char[] {‘a’,’b’,’c’}; //anonymous char array
3. new String[] {“Webnoid”, “Schools”}; //anonymous String array





Leave a Reply

Your email address will not be published. Required fields are marked *