title: How to observe multiple data of same class in Java observable (MVC)?
body: <p>Here's 2 option that i thought of.</p>
  
  <ol>
  <li><p>Have multiple models each representing one class. If i have 2 int
  object, i need to create 2 observable and have view checking which
  observable is changed.</p></li>
  <li><p>In a single observable (model), group multiple object of the same
  class into Array. In view i will have to iterate the array and
  change all fields containing all data in the array.</p></li>
  </ol>
  
  <p>I am starting to learn how to implement MVC pattern, using java observable and observer. I find the 2 methods which i have mentioned is not the best solution. Hope can get some help on this.</p>
  
  <p><strong>Edit:</strong>
  Example, i have the following methods in observable class, can someone show me how to write the update() in observer to get the value of int b?</p>
  
  <pre><code>public void setIntA(int a){
       this.intA = a;
       setChanged();
       notifyObservers(a);
  }
  public void setIntB(int b){
       this.intB = b;
       setChanged();
       notifyObservers(b);
  }
  setIntA(5);
  setIntB(3);
  </code></pre>