In Java it works by accepting an object which implements runnable :
Thread myThread = new Thread(new myRunnable())
where myRunnable
myRunnable
I did the following and it appears to be working as expected.
Thread(Runnable { //some method here }).start()