Michael Grünau wrote:My idea of return was always that return ends the program and shows on the console some kind of value if associated.
This is completely incorrect, and believing it is the reason for your confusion.
That "return" statement will be inside a method, and that method will be declared to return a value of type int. The effect of the "return" statement is for the code in that method to stop processing, and for the code in the place where the method was called to resume processing. And the value returned will be the value of the method call.
In other words that code is inside a method declared something like this:
And you'll find that the method is used something like this:
Michael Grünau wrote:. . . Can I write something like this in my Main-Method? . . .
Yes, but that sort of code belongs in a different method. Write int ergebnis with the space after the  and a small e. That won't show anything on screen. If you want anything to appear on screen you will have to write System.out.print.... or similar.
You can access the data if you assign the array to a variable. You can print the array the usual way, but arrays don't overridetoString(), so you are better off with System.out.println(Arrays.toString(myArray));