Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to scan a String in Java

import java.util.*;
public class ScannerExample 
{
  public static void main(String args[])
{
    Scanner in = new Scanner(System.in);
    String name = in.nextLine();
    System.out.println(name);  
}
}
 
PREVIOUS NEXT
Tagged: #scan #String #Java
ADD COMMENT
Topic
Name
8+3 =