title: Getting an error when try to execute java function
body: <p>I have created a java function to do some calculations. But i am getting error as follows </p>
  
  <blockquote>
    <p>Solution.java:#line_num: error: cannot find symbol
            double a=count1/arr.length;
                     ^   symbol:   variable count1   location: class Solution Solution.java:#line_num: error: cannot find symbol
            double b=count2/arr.length;
                     ^   symbol:   variable count2   location: class Solution Solution.java:#line_num: error: cannot find symbol
            double c=count3/arr.length;
                     ^   symbol:   variable count3   location: class Solution 3 errors</p>
  </blockquote>
  
  <p>as my code i getting input from users and pass data to function. But i cant recognize what us the issue.
  I have mentioned my function below</p>
  
  <pre><code>static void plusMinus(int[] arr) {
      for(int i=0;i&lt;arr.length;i++){
          int count1=0;
          int count2=0;
          int count3=0;
  
          if(arr[i]&gt;0){
              count1++;
          }
          else if(arr[i]&lt;0){
              count2++;
          }
          else{
              count3++;
          }
      }
      System.out.println(count1/arr.length);
      System.out.println(count2/arr.length);
      System.out.println(count3/arr.length);
  
  }
  </code></pre>