Anonymous arrays in Java is an Array without any name, just like Anonymous inner classes and policy of using Anonymous array is just create, initialize and use it, Since it doesn't have any name you can not reuse it. Anonymous array was a good way to implement variable argument methods before Java introduced varargs in Java5. You had the liberty to create array of any length and pass that to method which operate on anonymous array. Classical example of such variable argument method is aggregate function like sum(), avg(), min(), max() etc. In this java anonymous array tutorial we will how to create anonymous array, how to initialize them and example of anonymous array as variable argument method.
Sabtu, 07 Januari 2012
core java
How to create and initialize Anonymous array in Java Example
Read more »
0 Response to "How to create and initialize Anonymous array in Java Example"
Posting Komentar