Search
 
SCRIPT & CODE EXAMPLE
 

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);  
}
}
Comment

PREVIOUS NEXT
Code Example
Java :: java generate secure random password 
Java :: scanner check if int 
Java :: import random java 
Java :: expected exception junit 
Java :: rps java 
Java :: try catch java 
Java :: java get classname 
Java :: how to declare array java 
Java :: @notblank not working in spring boot 
Java :: i have AdoptOpenJDK 8 but java --version gettinbg Unrecognized option: --version Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. 
Java :: android studio remove action bar 
Java :: how to find the average in an arraylist 
Java :: collections.reverseorder() in java 
Java :: java random unique key 
Java :: delay a function call in java 
Java :: open gallery android 
Java :: android check if app is running 
Java :: java find last element in array 
Java :: java foreach arraylist 
Java :: jframe border 
Java :: android how to get current activity 
Java :: android java xml combo box 
Java :: java string to lower case 
Java :: math library java 
Java :: start new activity android 
Java :: How to count the number of islands (groups of adjacent 1s) in a grid of 1s (land) and 0s (water), in Java? 
Java :: does set automatically get rid of duplicates in java 
Java :: java gridpane background color 
Java :: how to convert milliseconds into second in android studio 
Java :: java.math.biginteger cannot be cast to java.lang.long 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =