2. Method inside Method In java , one method can not be inside the another method. If you try to put it, then you will get illegal start of expression error as shown below: