package oop.Generics;

public class Pocket<T> {
	
	private T value;
	public Pocket() {}
	
	public Pocket(T value) {
		this.value = value;
	}
	
	
	public T getValue() {
		return value;
	}

	public void setValue(T value) {
		this.value = value;
	}
	

	@Override
	public String toString() {
		return "Pocket [value=" + value + "]";
	}

	
	public static void main(String[] args) {
		Pocket<Pocket<String>> pocketOfPockets = new Pocket<>();
		pocketOfPockets.setValue(new Pocket<String>());
		pocketOfPockets.getValue().setValue("Innere Pocket");
		System.out.println(pocketOfPockets.getValue().getValue());
	//-----------------------------------------------------------------
		Pocket<String>[] pocket = new Pocket[10]; // mit 10 Plätzen

		
	}

}
