title: sending value to another method in another class in JAVA
body: <p>sorry I'm new to java. I want to pass the mark1 to class Exam in method Calculator, but I got some error how can i do that the program say incompatibe type. What can I do?</p>
  
  <p>I want to send mark1 from this method:</p>
  
  <pre><code>public float SendMark(){
      Exam ex = new Exam();
      for (int i=0; i&lt;students.length; i++) {
          mark1 = students[i].getMark();
      }
      return ex.Calculator(mark1);
  }
  </code></pre>
  
  <p>to this class and method calculator ... but it say incompatible type ... to this method i want to sum the Array value and get average of the array values ... is it correct way ?? what should i write here ...?  please help me details thanks ...</p>
  
  <pre><code>public class Exam {
      public Calculator (float mark1) {
          AddList ad = new AddList();
  
      }
  }
  </code></pre>