Posts

Showing posts with the label Java util Scanner

Scanner Class in Java: Complete Guide to User Input with Examples

Scanner Class. Scanner Class is present inside the java.util package. It is used for the take the input from user. Scanner Class method. nextByte();read byte data. nextShort();read short data. nextInt();read integer data. nextLong();read long data. nextFloat();read float data. nextDouble();read double data. nextBoolean();read boolean data. next();read string and character data. nextLine();read string data.