It's going on 4 hours now, and I have yet to find an answer on how to do this.

All I want to do access and manipulate data in a list, from another class.

The 2 classes:

public class GetList {
  public static void main(String args[])  
	  MakeList xx = new MakeList();
	  System.out.println(xx.NameHere() + " " ); // < < < < Error


import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class MakeList {
	public List<String> NameHere (String args[])  
		  List<String> listname = new ArrayList<String>();
		  listname.addAll(Arrays.asList("e","f","g") );
		  return listname;

NameHere is a method that takes a String[] as a parameter. You try to call it without supplying a parameter

Supplying it with an argument creates more errors.

And using my telepathic powers to see what argument you used and exactly what the errors were, I can tell that .... oh dear, telepathic powers failed.

OK, OK, don't take it personally! If you post the exact code and the exact error message(s) I'll help.


lol, I think he may have taken it seriously... ;)

but as for the problem, just remove the 'String[] args' parameter from the 'public List<String> NameHere (String args[]) ' method declaration... I'm not sure how that parameter is helpful...