I want to give an example.
import java.util.Scanner;
public class ana
{
public static void main(String[] args) {
int[] array = new int[9]; // create array that have "9" elements
}
}
Above example’s array have 9 elements but i want to create unlimited array.
If I want this when I’m writing PHP I write this code:
<?php
$example = array();
$example[] = 15; // auto numbering. PHP don't want number of array's element.
$example[] = 20;
?>
And what does mean?
Auto[] array = {new Auto()};
I hope I made myself clear.
Use a List (such as an ArrayList). Java has a number of collections (List, Set, Map, Queue, etc.), with various implementations. Learn how to use them by reading the collections tutorial.