string argument for array static method header help for java
<p>I have placed string argument in the method header called methodASet. Is it possible to use this string argument in the body and returns the words in the argument as a set? If so how do I do this? Thanks.  </p>

<pre><code>public class MyMates {

private static Set&lt;String&gt; names;
private static String[] name1 = null;
private static String[] name2 = null;
private static String[] name3 = null;


public MyMates() {
    methodASet(); // (2) but I then get a error message "methodASet(java.lang.String) in myMates cannot applied to ()
    names = new TreeSet&lt;String&gt;();
}

public static void methodASet(String aTemp) {

    name1 = new String[]{"Amy", "Jose", "Jeremy", "Alice", "Patrick"};
    name2 = new String[]{"Alan", "Amy", "Jeremy", "Helen", "Alexi"};
    name3 = new String[]{"Adel", "Aaron", "Amy", "James", "Alice"};

   return aTemp; // (1) is it like this? 
}
</code></pre>
