title: Calling static method by reflection is thread safe in java?
body: <p>Is this code thread safe ?</p>
  
  <p>create runnable and invoke a method by reflection :</p>
  
  <pre><code> public class A {
      public static void  someMethod (List&lt;VO&gt; voList){
          int endIndex=0;
          for (int firstIndex = 0; firstIndex &lt; voList.size(); ) {
              endIndex = Math.min(firstIndex + threadSize, voList.size());
              Runner runner = null;
              try {
                  runner = new Runner(voList.subList(firstIndex, endIndex),
                                      B.class.getMethod("createSomeString", D.class));
              } catch (NoSuchMethodException ex) {
                  log.warn(ex.getMessage());
              }
              //start a thread
              runner.start();
          }
  
      }
  
      private static class Runner extends Thread {
          private Method method;
          private List&lt;C&gt; list;
          public Runner(Method method,List&lt;C&gt; clist) {
              this.method = method;
              this.list=clist;
          }
      }
  
      public void run() {
          for (C vo: list) {                
              String xml = (String) method.invoke(null,vo);
          }
      }
  }
  </code></pre>
  
  <p>I want to call a static method by reflection ,is this code block thread safe ? </p>
  
  <pre><code>   public class B {
     public static String createSomeString(D a) throws Exception {
       return a.name;
     }
     }
  </code></pre>
  
  <p>and D.class is Plain old java object class like this :</p>
  
  <pre><code>   public class D implements Serializable{
     private String name;
     }
  </code></pre>