SimpleyArray
public class SimpleArray<T> {
private Object[] object;
private int index = 0;
/** * Method add() add value, defined in the instance of SimpleArray class to the array. * @param value that would be added to array. */
public void add(T value) {
this.object[index++] = value;
}
/**
* Method get() created to get the value from the array passing the index.
* @param position in array, which value going to get.
* @return value from index was passed to the method.
*/
public T get(int position) {
return (T) this.object[position];
}
}