Why make a method volatile in java?
<p>Why would a method be made volatile? How does making a method volatile change the method's behavior? </p>

<p><strong>Edit:</strong> I did a toString() on a Method object returned by a class object (Java Reflection). The return string had a volatile modifier against the method name along with public visibility and void return type. Research yielded only information on volatile for properties. This is why I asked this question. </p>

<p>The method declaration was:</p>

<pre><code>public volatile org.osmdroid.api.IGeoPoint org.osmdroid.views.MapView.getMapCenter()
</code></pre>

<p>Code for the Reflection Method:</p>

<pre><code>public static class Test {

        public static void showMethods(Object target) {
            Class&lt;?&gt; clazz = target.getClass();
            String current;
            for (Method method : clazz.getMethods()) {
                if (method!=null)
                {
                    current = method.toString();
                    System.out.println(current);
                }
            }
        }
    }
</code></pre>

<p>Method invocation:</p>

<pre><code>Test.showMethods(mapView);
</code></pre>
