title: Run method within object
body: <p>While surfing,I got through a thing which confused me ,</p>
  
  <pre><code>Thread x=new Thread()
  {
   void run()
   {
     //some code 
   }
  };
  </code></pre>
  
  <p>Was wondering how can we directly use run method with this object making,what's the benefit of doing this and can we define a any method with any object,or we have to override a method,I am simply confused what's happening here.Please help me out </p>