✏️ Explanatory Question
Scanner sc = ____ Scanner(__________);
To complete the code for creating an object of the Scanner class, you need to import the Scanner class and use the new keyword to instantiate it. Here is the completed code:
import java.util.Scanner;
Scanner sc = new Scanner(System.in);
In this code:
import java.util.Scanner; imports the Scanner class from the java.util package.new Scanner(System.in) creates a new Scanner object that reads input from the standard input stream (System.in).