title: error: incompatible types: String cannot be converted to int
body: <p>I'm very new to programming and very very new to Java, so I'm sure this question (and all my other mistakes) will be very obvious to anyone with experience. I clearly don't know what I'm doing.
  My assignment was to convert Python code to Java. Below is my code.</p>
  <p>My two error codes are:</p>
  <pre><code>Assignment1.java:37: error: incompatible types: String cannot be
  converted to int 
  response = reader.nextLine();
  Assignment1.java:38: error: incompatible types: int cannot be converted to String 
  num = Integer.parseInt(response);
  </code></pre>
  <p>For clarification, I'm using JGrasp, but willing to not.</p>
  <pre><code>import java.util.Scanner;
  public class Assignment1 {
        public static void main(String[] args) {
      
           int num, response, min, max, range, sum, count, avg;
           Scanner reader = new Scanner(System.in);
           String reportTitle;
  
      
           //title
           System.out.println();
           System.out.println(&quot;Enter a title for this report&quot;);
           reportTitle = reader.nextLine();
           System.out.println();
           
           
           //data input
           System.out.println(&quot;Enter a series of numebr, ending with a 0&quot;);
           
           num = 0;
           sum = 0;
           response = 1;
           count = 0;
           max = 0;
           min = 0;
           range = 0;
           
           while (true)
           {
              if (response &lt; 1)
              {
                 System.out.println(&quot;End of Data&quot;);
                 break;
              }
              
            System.out.println(&quot;Enter number =&gt; &quot;);
            response = reader.nextLine();
            num = Integer.parseInt(response);
            
            sum += num;
            count += 1;
            
            if (num&gt;max)
            {
              max = num;
            }
            if (num&lt;min)
            {
              min = num;
            }
            
           }
           
           //crunch
           avg = sum / count;
           range = max - min;
           
           //report
           System.out.println();
           System.out.println(reportTitle);
           System.out.println();
           System.out.println(&quot;Sum: =&gt; &quot;+sum);
           System.out.println(&quot;Average: =&gt; &quot;+avg);
           System.out.println(&quot;Smallest: =&gt; &quot;+min);
           System.out.println(&quot;Largest: =&gt; &quot;+max);
           System.out.println(&quot;Range: =&gt; &quot;+range);
  
      
      }
  
  }
  </code></pre>