title: Warning: Resource leak: 'keyboard' is never closed
body: <pre><code>import java.util.Scanner;
  
  public class LetterGrade {
    public static void main(String[] args) {
      char grade;
      String input;
      Scanner keyboard = new Scanner(System.in);
  
      System.out.println("Enter grade awarded");
  
      input = keyboard.nextLine();
  
      grade = input.charAt(0);
  
      switch (grade) {
        case 'A':
          System.out.println("Grade was between 89.5 and 100");
          break;  
        case 'B':
          System.out.println("Grade was between 79.5 and 89.49"); 
          break;  
        case 'C':
          System.out.println("Grade was between 69.5 and 79.49");
          break; 
        case 'D':
          System.out.println("Grade was between 59.5 and 69.49");
          break;
        case 'F':
          System.out.println("Grade was below 59.5");
          break;
        default:
          System.out.println("Invalid grade inputted");
          break;
      }
    }
  }
  </code></pre>
  
  <blockquote>
    <p>[line: 9] Warning: Resource leak: 'keyboard' is never closed</p>
  </blockquote>
  
  <p>That's the warning that I'm receiving. I don't think the source is actually being leaked.
  But i don't know how to get it off so i can compile the code</p>