title: Inner class runnable in java
body: <p>say I have a class called "Example"</p>
  
  <p>inside "Example" I have an inner class which is a runnable</p>
  
  <p>I execute the runnable inside "Example"</p>
  
  <pre><code>public class Example {
      public Example() {
         //executing the runnable here
      }
  
      private void a() {
      }
      public void b() {
      }
  
      public class RunMe implements Runnable {
  
         public void run() {
             a();
             b();
         }
  
      }
  }
  </code></pre>
  
  <p>what happens here assuming that Example runs on the main thread?</p>
  
  <p>does a and b run from the RunMe thread or the main thread?</p>
  
  <p>does it matter that a is private and b is public?</p>