I've researched this subject thoroughly, including questions and answers on this website.... this is my basic code:
import java.util.Scanner;
class StringSplit {
public static void main(String[] args)
{
System.out.println("Enter String");
Scanner io = new Scanner(System.in);
String input = io.next();
String[] keywords = input.split(" ");
System.out.println("keywords" + keywords);
}
and my objective is to be able to input a string like "hello, world, how, are, you, today," and have the program break up this single string into an array of strings like "[hello, world, how, are, you, today]... But whenever i compile this code, i get this output: "keywords = [Ljava.lang.String;@43ef9157" could anyone suggest a way for the array to be outputted in the way i require??