Answer:
The method to this question can be defined as follows:
Scanner in = new Scanner(. . .);
in.useDelimiter("");
Explanation:
Following are the code to the question:
import java.util.*; //import package for user input
public class Main //defining class Main
{
public static void main(String ax[])//defining the main method
{
Scanner in = new Scanner("Database");//crearing Scanner class object that pass value in its parameter
in.useDelimiter(""); //using useDelimiter
System.out.println(in.next()); //use print method to print single character value
}
}
Output:
D
Code explanation: