 So one of the major points of doing all of this was that we could reduce things down into smaller and smaller text And one of the things that I can actually do to do that is actually utilize something known as a lambda expression Now what I'm going to go ahead and do is I'm going to get rid of, even before I get rid of it Let's take a look at what we're saying here for a second I'm saying create a new event handler that takes or is expecting an action event Meaning a clicking of the mouse Inside there create an integer count And also when someone clicks on whatever our button or our thing is Whenever this event transpires This is what I want you to do I want you to increment count and then just do a system dot out dot print LN okay button has been pressed X number of times What I can do with this is if we take a look You know this arg zero I don't like arg zero I know it's a generic thing that Eclipse will put in But typically I'll try and make this something like E You know whatever it's my little kind of cup of tea If you want something like AE And you can see you know we've actually done this in the past When we were working with exceptions for example we made an exception E Yes I know it's erroring We're trying to demonstrate that you know we would say exception E Something like action event AE you know I'm just giving it a name It's just a parameter in fact I'll keep it AE Now that AE since if we look at this for a second Even handler was an interface And the only thing inside of that interface was a method An abstract method called handle That took one parameter in action event And we're going to call our parameter in action event AE Well permit me to come in here for a second And do all of that Alright you're starting to get scared what's he what's he about to do I'm going to come in here and I'm going to say E dash greater than Dash greater than we've never touched that that's you know that's like PHP stuff going on there Well what we're doing is we're basically creating again this lambda expression Where we take all that text that we have down here And I'm reducing it down to the bare essentials I know oh well instead of E just so that we demonstrated it I was calling it AE and just so it doesn't throw you off too much You can see here's that AE here here's that AE here Java because of how a lambda expression is sort of designed Knows for a fact that this is referring to an action event And so what we can do because again we're designing this out Is I'm going to go ahead and just add some curly braces Notice what happened when I did that I have no error going on right now So Java's okay with this Now if I run this nothing's going to happen In fact just so we can see that in action yes You can see because my set on action is to do nothing I have it doing nothing But if I come into those curly braces Remember all they mean is that this is going to contain a block of code If I come in here and then tack on system.out.println Okay, pressed So if we run this a second time What's going to happen? As soon as I hit okay Okay pressed look at that That's amazing all that text that we did Just got short handed into one line Now you're probably saying to yourself Oh well how would I implement the count Well here's the kind of caveat to this Now that we're doing this lambda expression We're really condensing everything down We're compressing it down to bare essentials And unfortunately the count is not a bare essential So it actually is not really one of those things That we can just immediately fire off the get go But as you can see this just by itself Allows us to kind of reduce things down to the bare essentials