title: How exactly do "Objects communicate with each other by passing messages"?
body: <p>In several introductory texts on Object-oriented programming, I've come across the above statement. </p>
  
  <p>From wikipedia, "In OOP, each object is capable of <strong>receiving messages</strong>, processing data, and <strong>sending messages</strong> to other objects and can be viewed as an independent 'machine' with a distinct role or responsibility."</p>
  
  <p>What exactly does the statement mean in code?</p>
  
  <pre><code>class A
  { 
      methodA()
      {
  
      }
  }
  
  
  class B
  {
      methodB()
      {
  
      }
  }
  
  
  class C
  {
      main()
      {
          A a=new A();
          B b=new B();
          a.methodA(); // does this mean msgs passing??
          b.methodB(); // or does this?? I may be completely off-track here..
      }
  }
  </code></pre>