How can I specify array with varying length (no specific length)?
In PHP, we can assign associative array with no specific length defined, such as $var['fruit'][] = "apple", the length will be automatically incremented on demand.
While in Java, we have to specify the lengh before we use it, such as:
String[] fruit = new String[10];
I would like to ask sometimes we have to store the information with varying length, what is the alternative method of Java to accomplish this?

