Let me put it this way...
Few facts about instance variables:
1. They can be directly accessed from within instance(non-static) methods. //As you can see in m1() method
2. As and when different objects are created, a dedicated copy of the instance variables also gets created. // Line 1 and 3
i.e the application while running might contain different copies of the same variable name(x).
Now, Since there are many copies of instance variables at a time, the only way the JVM can determine which copy of x are we referring to in m1 method is by the calling method. //Lines 2 and 4
Facts about static variable:
3. Only one copy of the variable will be present at a time irrespective of the number of objects getting created. So it can be directly accessed from instance or static methods.
4. static modifier when used along with a method means any user can access this method. Rather than saying object is not required, I would say object is not mandatory to call such methods.
In your code, you're trying to call a instance method sM1 from a static method(main).
s1 = sM1("b"); //Line 5
Now assume if compilation was successful for Line 5 of your code, if there were any instance variables used in the instance method sM1, the JVM will never come to know which copy of the instance variable are you referring to(explained in point# 2). So, java never allows any scenarios of an instance method being called from a static context and hence compilation fails as you've not followed the JVM standards in your coding.
It does not compile because the method sM1 is not static.
--> Incorrect
It does not compile because of the call to the method
.
//static String s1 = sM1("a");
Here sM1("a") is called from a static context whereas
//String s1 = sM1("a");
Its not called from a static context and hence no error.
Same case for s2.
Hope this gave you some light on to how to program. FYI, General real time usage of static methods are functionalities that are provided to the public like loan calculator you see in bank websites. The functionality can be accessed by anyone using the website. If you've noticed, it does not contain any customer specific information --> technically means no instance variables.