hi Murtuza Akhtari
The enclosing method, m3, is declared with the result type, int. The return statement generates a compile-time error, because it does not contain an expression that produces a value that is assignable to the declared result type.
I can explain more aove statement, m3 is declered as a method and it will return an integer after invoked, but please notice the method body, it does not produce a value { return;} that matches the return type of method static int m3(....).... So, compile-time error occured.