package diesunddas;

import java.util.Arrays;

public class Rekursiv {
	double array[];
	
	public Rekursiv(double[] arra){
		array = arra;
	}
	
	public int länge(){
		return länge(0);
	}
	
	public int länge(int z){
		z++;
		try{
			@SuppressWarnings("unused")
			double test = array[z];
			return länge(z);
		} catch(Exception e){
			return z;
		}
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Rekursiv arr = new Rekursiv(new double[]{0,1,2,3});
		System.out.println(Arrays.toString(arr.array));
		System.out.println(arr.länge());
	}

}
