I have come across the minor problem in Java. I was making a simple text game for fun, and my scanner variable (if you call it that) says "Resource leak: "in" is never closed"

The program runs fine, it's just something that bothers me. I know its there and though theres a slight error it still runs. Any explanations?


import java.util.Scanner;

public class TGMain {

public static void main(String[] args) {
String name;
String feelings;
Scanner in = new Scanner(System.in);
System.out.println("Welcome! This is a simple text based game.");
System.out.println("What is your name?");
name = in.next();
System.out.println("Hello, " + name + "! " + "How are you today?");
feelings = in.next();
System.out.println("You're feeling " + feelings + "? Okay! Let's get started.");
}
}