Hi,
I'm trying to take an input from the user in the form of a
string variable. This variable is spilt by the "." in the string given. Now here is where I'm having the trouble I'm not sure on how to take a spilt string like this and convert it to and array that I can use for output to the user where I could report single sections of the string. Any advice would help
Thanks
This is my code so far I have tried doing it a couple different ways not sure this one is the best way to go our not
import java.util.Scanner;
import java.util.*;
public class Extensions {
public static void main(String [] args){
Scanner string = new Scanner(System.in);
System.out.println("Please enter your file name to have it tested");
String answer = string.nextLine();
List<String> list = new ArrayList<String>(Arrays.asList(answer.split(" . ")));
}
}