Syntax of scanner type JAVA programs?
Answers
Answered by
1
Explanation:
Example 1
import java.util.*;
public class ScannerExample {
public static void main(String args[]){
Scanner in = new Scanner(System.in);
System.out.print("Enter your name: ");
String name = in.nextLine();
System.out.println("Name is: " + name);
in.close();
Hope you got correct✔ answer...xd
Answered by
5
Answer:
- public class ScannerExample {
- public static void main(String args[]){
- Scanner in = new Scanner(System.in);
- System.out.print("Enter your name: ");
- String name = in.nextLine();System.out.println
- ("Name is: " + name);in.close();
Similar questions
Social Sciences,
3 months ago
English,
3 months ago
English,
3 months ago
Political Science,
6 months ago
Physics,
6 months ago
World Languages,
1 year ago
Math,
1 year ago
Math,
1 year ago