Terms
So why does the main method have all those crazy terms in it? So, there is some logic behind it. This are the different ways you can call your main method.
Usually people use this:
WHY USE THESE MODIFIERS?
- public
- static
WHY USE THIS RETURN TYPE?
- void
WHY USE THIS NAME?
- main
WHY USE AN ARRAY?
- String[] args
inside main method
Cuz it will cost a lot of extra code, we don’t gonna write every method STATIC in the main class, because that is necessary when you don’t make an object of the main class. We make an object of the main class:
Place
you have to place ALL methods inside the JAVA CLASS!
Therefore also the main method!