title: How to set google protobuf repeated field in java
body: <p>Here is my definition</p>
  
  <pre><code>message point{
    optional float x = 1;
    optional float y = 2;
  }
  message test{
    repeated field point = 1;
  }
  </code></pre>
  
  <p>In my <code>example.java</code> file I am trying to create a builder as follows:</p>
  
  <pre><code>for(i = 0; i &lt; somearr.size(); i++)
  {
      // I get x and y values from traversing the array 
      float x = getX;
      float y = getY;
  
      // now I want to set the repeated field point
  }
  </code></pre>
  
  <p>How do I set the repeated field points?</p>