title: How to convert List to JavaRDD
body: <p>We know that in spark there is a method rdd.collect which converts RDD to a list.</p>
  
  <pre><code>List&lt;String&gt; f= rdd.collect();
  String[] array = f.toArray(new String[f.size()]);
  </code></pre>
  
  <p>I am trying to do exactly opposite in my project. I have an ArrayList of String which I want to convert to JavaRDD. I am looking for this solution for quite some time but have not found the answer. Can anybody please help me out here?</p>