Create method with function parameter
<p>I've just discovered this method : </p>

<pre><code>new Thread(
            new Runnable() {
                public void run() {
                    try {
                        // MY CODE
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                }
            }).start();
</code></pre>

<p>I wonder if I can create a method with the parameter is the function I will put to // MY CODE. Can I do that ? and how :)</p>
