title: Java: How to create an array of objects which include arrays?
body: <p>I would like to create a list objects called Product (Listproducts) where Product includes the following members:</p>
  
  <pre><code>public class Product {
  
  private Double price;
  private String title;
  private String description;
  private List&lt;Point&gt;points;
  ...
  }
  </code></pre>
  
  <p>Point is another object which includes latitude and longitude:</p>
  
  <pre><code>public class Point{
  Double lat;
  Double lng;
  ...
  }
  </code></pre>
  
  <p>In the application I first have to create the list List products from XML file and then display the products on the map. One product can be located at several locations.
  Does anyone know what is the most appropriate way to create the structure (a list or linked list) which is the easiest to iterate through and enables to link the lists?</p>
  
  <p>The logic should work the following way:
  1. Read each point from the list
  2. Check which product belongs to the point
  3. Display the product informations on the map</p>
  
  <p>Thank you!</p>