title: when I copy some java code from another online IDE to visual studio code, it shows "unsolved compilation error"
body: <p>I just copied beneath code from online IDE to VS code.also I have imported java.util.Scanner and other basic things.But when I try to debug that It shows &quot;Exception in thread &quot;main&quot; java.lang.Error: Unresolved compilation problem:&quot;</p>
  <pre><code>Scanner num=new Scanner(System.in);
          int num1=num.nextInt();
          int num2=num.nextInt();
          int num3=num.nextInt();
          num.close();
          System.out.print(num1+&quot;\n&quot;+num2+&quot;\n&quot;+num3);
  </code></pre>
  <hr />
  <p>The full script---</p>
  <pre><code>import java.util.Scanner;
  public class hackerank {
  
      public static void main(String[] args) {
        
        
          Scanner num=new Scanner(System.in);
          int num1=num.nextInt();
          int num2=num.nextInt();
          int num3=num.nextInt();
          num.close();
          System.out.print(num1+&quot;\n&quot;+num2+&quot;\n&quot;+num3);
          
          
      }
  }
          
  </code></pre>