title: Drools : How to get String in List<String>
body: <p>I want to get String in List&lt; String > but did not work.</p>
  
  <p><strong>Drools Rule</strong></p>
  
  <pre><code>import schedule.Schedule
  import schedule.Control_Exam_List
  
  rule "People"
      salience 5
      when
          $controlExamList : Control_Exam_List( ) from accumulate( $scheduleCheck : Schedule( $scheduleCECheck1 : control1 , $scheduleCECheck2 : control2 , $scheduleCECheck3 : control3 ) ,
                                init( Control_Exam_List CEL = new Control_Exam_List(); ),
                                action( CEL.addData($scheduleCECheck1); CEL.addData($scheduleCECheck2); CEL.addData($scheduleCECheck3); ),
                                result( CEL ) )
      then
          System.out.println("Test1: "+$controlExamList);
  end
  </code></pre>
  
  <p>The result return list but I get all string from this list.</p>
  
  <p><em>Result : Still list&lt; String ></em></p>
  
  <pre><code>Test1: schedule.Control_Exam_List@22916a
  </code></pre>
  
  <p><strong>Control_Exam_List Class : List&lt; String ></strong></p>
  
  <pre><code>import java.util.ArrayList;
  import java.util.List;
  
  public class Control_Exam_List {
      private List&lt;String&gt; code = new ArrayList&lt;String&gt;();
  
      public void addData(String code){
          if(this.code.contains(code) != true &amp;&amp; !code.equals(""))
              this.code.add(code); 
      }
  
      public List&lt;String&gt; getCode() {
          return code;
      }
  }
  </code></pre>
  
  <p><strong>Schedule Class : Accumulate from this class</strong></p>
  
  <pre><code>public class Schedule {
  
      private String control1 = "", control2 = "", control3 = "";
  
      public String getControl1() {
          return control1;
      }
  
      public String getControl2() {
          return control2;
      }
  
      public String getControl3() {
          return control3;
      }
  
      public void setControlExam1(String ce_code) {
          this.control1 = ce_code;
      }
  
      public void setControlExam2(String ce_code) {
          this.control2 = ce_code;
      }
  
      public void setControlExam3(String ce_code) {
          this.control3 = ce_code;
      }
  }
  </code></pre>