You calculate average and return it at the "durchschnitt" method (which I renamed here to "erhaltenDurchschnitt") like this:
public static double erhaltenDurchschnitt(double[] d)
{
double sum = 0;
for(int i = 0; i < d.length; i++)
{
sum += d[i];
}
return sum / d.length;
}
Then at the end of the "main" method you add:
JOptionPane.showMessageDialog(frame, "Der Durchschnitt betragt " + erhaltenDurchschnitt(durchschnitt));
System.exit(0);