title: Problem instantiating a class in a scriptlet
body: <p>When I want to instantiate a class or use a static class method, I get an error on the web page. Here I show you what happens:</p>
  <p>I have created this super simple class to show the problem:</p>
  <pre><code>package CalculosMatematicos;
  
  public class calculos {
      
      public static int resultado;
      
      public static int metodoSuma(int num1, int num2){
          
          resultado = num1 + num2;
          return resultado;
      }
      
      public static int metodoResta(int num1, int num2){
          
          resultado = num1 - num2;
          return resultado;
      }
      
      public static int metodoMultiplicar(int num1, int num2){
          
          resultado = num1 * num2;
          return resultado;
      }
      
      public static int metodoDividirf(int num1, int num2){
          
          resultado = num1 / num2;
          return resultado;
      }
      
  }
  </code></pre>
  <p>In the JSP I wrote:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;%@page import="CalculosMatematicos.*"%&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
          &lt;title&gt;JSP Page&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;h1&gt;Hello World!&lt;/h1&gt;
          La suma de 7 + 5 es: &lt;%= calculos.metodoSuma(7,5)%&gt;
      &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>The error is this:</p>
  <p><img src="https://i.stack.imgur.com/aQDCF.png" alt="https://i.stack.imgur.com/aQDCF.png" /></p>