So now we can talk about methods with return value and it works like this.
Delete everything.
And for example we want also use like an
like method that just adds to values then which do it like this say it.
So not what adds but add and then we would use or power meters and X and Y and then we would say return
x plus y.
So this is our return statement.
So every time we run this Methot we firstly want to return.
And so this importances first thing makes the Methot offer a special type in all caps it's like we could
use like a string and other types.
In our case an integer.
So we return an integer.
So we give back in integer.
So this means we get an integer out always if we run this method.
So we run this method.
You say X 2 and screen and we could run it now and nothing would happen.
You see and nothing happens and that's because we have to print it all out for us so we can say print
and we've got a method and we say add two and three and run it and we we get five.
So this is all our return all return right.
And the important thing to know is that you can work with this return.
So it makes your message even more dynamic because now you've got like value back in the last example
you.
We also could print it out but we had to say print like in our Methot.
So our method would always give all to prints.
So but in our case it always gives it an integer on with the next job we can make like more math multiplications
for example so we could if it's if this is not all our whole we're all value so it's not our end goal
is to just add like these two numbers but maybe add it like.
So at and we can't do it like in here and we have to do it at some other place.
So all we've got here are a return and we at for MAUNSELL We've got 9 no.
So this is really the important part for knowing that you understand that you get the return statement
returns the value the kind of type of your message.
So in our case an integer and you can work with these types mossel makes you on this it's even more
dynamic and you can make more complex things with it.
So I hope this was clear faunal bots you yeah get a better grasp of it if you tried all that at some
time.
So maybe it was like a string method on your own.
So a bit string method.
And then if you print it out maybe add it to another string or something and yeah I hope you get it.
So far.