title: How to create and display a list in Java?
body: <p>i have to create a list of ,let's say 50 people, (in Java) and display the list, and i don't really know how to do that. so this is what i have tried to do so far . please correct and complete some of my code .</p>
  
  <pre><code>public class Person {
  
      String name;
      String stuff;
  }
  
  
  public class CreatePerson {
  
  
  
  public static void  ang()  {    
  
      ArrayList&lt;Person&gt; thing=new ArrayList&lt;Person&gt;(); 
      Scanner diskScanner = new Scanner(in);
  
  
      for(int i=0; i&lt;50; i++){
  
          Person pers = new Person();
  
            out.print("name: ");
        pers.name=diskScanner.nextLine();
  
        out.print("stuff: ");
        pers.stuff=diskScanner.nextLine();
  
        thing.add(pers);
  
            break;
  
      }
      // Display people  
      for (int i=0; i&lt;50; i++) {
          out.println(??);{
          }
  
  } }}
  </code></pre>