Read many [overkilled](https://stackoverflow.com/questions/28604984/how-can-i-get-main-thread-from-thread-currentthread), [overcomplicated](https://stackoverflow.com/questions/16268693/running-code-on-the-main-thread-from-a-secondary-thread) solution here in SO, for such an easy question, how to access main thread from a worker thread, to execute some code on it.

In iOS `dispatch_get_main_queue()` method returns main thread. How in Java?

```
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0UL), ^{
    //do background thread stuff

    dispatch_async(dispatch_get_main_queue(), ^{
        //update UI
    });
});

```