I am trying to put an object w into an ArrayList, then display the contents of w, which is in the ArrayList. Here are the two classes I am using:

Code:
import java.util.*;
public class App {
 
 
	
	public static void main(String[] args) {
		
	ArrayList test = new ArrayList();
		
		Worker w = new Worker();
 
		w.setAttributes();
		
		w.testOutput();
		
		test.add(w);
		
		
		
	
	}
 
	
	
}







Code:
import java.util.*;
public class Worker {
 
	String name;
	String name2;
	int floor;
	int ceiling;
	
	
public Worker(){}
public Worker(String name, String name2, int floor, int ceiling)
{
 
}
	
public void setAttributes()
{
	name = "Todd";
	name2 = "McCree";
	floor = 1;
	ceiling = 8;
}
 
public void testOutput()
{
	System.out.println(name + "\n" + name2 + "\n" + floor + "\n" + ceiling);	
}
 
 
 
}
I have the method testOutput() just to verify that my attributes are being set accordingly. It's driving me crazy not being able to figure out how to print out the contents of the ArrayList. Any help is greatly appreciated. Thanks to all!