title: Creating a Todo List in Java
body: <p>As i m a new programmer, i m interesting for the right aproach. I want to make a todo list, very simple at the beggining but with more features later. </p>
  
  <p>I have this code:</p>
  
  <pre><code>    import java.util.ArrayList;
      import java.util.Scanner;
  
      class AddtoList{
          public static void main (String[]args{
                 Scanner scanner = new Scanner(System.in);
                 String task = scanner.nextLine();
                 ArrayList&lt;String&gt; myList = new ArrayList&lt;&gt;;
                 myList.add(task);
  </code></pre>
  
  <p>Assuming that later i want to mark task as completed, or have different lists, priority etc. Is this a right approach or should i have to create a task Class, a createList class and then add the "object" task in an ArrayList ?
  I know that the best way is to be easier to maintance, but until now i m deleting and writing classes all the time without be able to understand which is the best approach.</p>