title: how to write custom function/method in java? (RFT)
body: <p>I need to process few lines of code over and over in RFT (java) so custom method/function/procedure is the best (and only) solution to this.</p>
  
  <p>I have no java experience so I need some help with that.</p>
  
  <p>The method will receive some parameters and will return no value.</p>
  
  <p>Basically it will be entering new records into a database (web based application). How many records? It depends on data so I need to make it argument based.</p>
  
  <p>the current code looks like</p>
  
  <pre><code>    text__firstname(ANY,NO_FLAGS).setText(dpString("StudentName"));
      text__surname(ANY,NO_FLAGS).setText(dpString("StudentSurnameName"));
  </code></pre>
  
  <p>in php the desired function would look like</p>
  
  <pre><code>   function add_student($first_name,$surname){
      text__firstname(ANY,NO_FLAGS).setText($first_name);
      text__surname(ANY,NO_FLAGS).setText($surname);
     }
  </code></pre>
  
  <p>so I can call it </p>
  
  <pre><code>   add_student(dpString("StudentName"),dpString("StudentSurnameName"));
  </code></pre>