Accessing list out another class
I have stored values in a List(public static )...I want to use those values inside another class
without extending that class How can i?
Code:
public class nodes
{--------
public static List list;
public nodes()
{
list = new ArrayList();
}
private void printData()
{
System.out.println("No of Employees '" + list.size() + "'.");
/** this is the iterator i want to cal in Paint class **/ it = list.iterator();
while(it.hasNext())
{
System.out.println(it.next());
}
public void addData(Parameters)
{
/** adding to the list from this method
}---------------------
}
public class Paint
{
Iterator it2;
List list2;
nodes obj;
----------
public void print()
{
/** trying to reterive node class's list here
list2 = obj.list;
it2 = list2.iterator();
}
}
help me please! windows 98 - dont know...
At me such question
I can not change the menu in Windows, it looks on new why that....
Help to adjust... At me of a Window 98