What exactly are Java methods?
A method is a collection of variables, expressions, and control flow statements bundled together inside an opening and closing curly brace, preceded by a name. We have already been using lots of methods, but we just haven't looked very closely at them yet.
Let's start with the method structure.