-2

The thing I need to know is how can I get input from the user through the console and add it to an array list to keep the data stored? May someone kindly walk me through the process of getting this done for me?

What I know how to do so far:

 Scanner s = new Scanner(Sytem.in);
system.out.println("Please type in task to add to your to do list.");
String[] todo = new String[] {

}
Kyrix
  • 51
  • 2
  • 8

2 Answers2

1

If you're going to use Scanner, using something along the lines of .next() etc. would be handiest. There's lots of information in the JavaDocs.

They provide some example code that should indicate how this works. It's always best to have a look at the docs and trying to run the example code they provide to get an understanding before posting on StackOverflow

0

You may use command line arguments to pass some initial data docs.
There is also so called a "streams" notion (not Stream API) docs.
IMHO the simplest way to accomplish so using Scanner link.
There is also a blog of a very cool guy there you can find answers to most of your questions link.