This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Look where you put the implementation of the methods m1() and m2(), it is inside main() method which is the wrong place.
Place the implementation outside main() method and you should be getting no errors.