import java.util.Scanner;
public class Test{
public static void main(String[] args){
Scanner input = new Scanner(System.in);
input.useDelimiter(".");
String given = input.next();
System.out.println(given);
}
}
When I run the above code and type in asdf.
then enter, I get nothing.
It works fine with ","
";"
"""
""
or whatever, but just not with "."
... So is there something about a dot or is it just a problem with Eclipse IDE or whatever?