Help with displaying contents of ArrayList of objects

New to Java. I am trying to display the contents of my ArrayList. In the ArrayList are objects based off the Class PalletLocations. If I loop through the ArrayList I just get the object name/location (not sure what it is). For example "wms.PalletLocations@30fc1f".

You are getting the default toString() when you call System.out.println() of the PalletLocations object. You must explicitly write your own toString() or expand the call of System.out.println() to display all the object infos you want to display.

It should do it palletLocList.size() times as you have coded in the for loop.
It doesn't look in the array at all. It uses the static variable's value for the class.
Because you have the variables static, there is only ONE copy of them. Remove the static modifier for all the variables in the class.

need your suggestion of toString()

You need to add the method: public String toString() { <your code here> }
to the PalletLocations class.

I still have the issue of getting a particular item from the arraylist. When I run my while loop code, I have added two palLoc objects to palletLocList. When I go through the

if (fromComboBox.getItemCount() > 0 ) {

piece, the setText should be set to the first object's location. It currently sets it to the second location, which is the last one added to the list. How do I point to specifiy object in the arraylist?

All I need for the arraylist is to keep a collection of data. So I have a Location and for a particular Location it has 4 properties (palletNbr, location, qty, itemNbr). I am assuming the arraylist is what I need for this (I come from a VB background and am basing this off of a collection of Types). Then I need to be able to access particular Locations and retrieve its properties. So when I say "point to" I mean how do I retrieve data from a particular Location in the arraylist? For example I have 3 Locations, with its 5 properties, how do I retrieve the data from the 2nd one. If I was using an array I would use like aPallets[2].Location or something similar I believe. So yes, like having the index.

Well, my boss had me working on other projects so I just started this one back up this morning. I am still at the same point, trying to determine how to get a specific piece of data from a specific item in my arraylist. I have code that adds a collection of items to the arraylist. Then I want to pull out certain pieces of info based on a certain item in the collection. Though it just seems that I only get the last item added. I don't know how to retrieve info from the other items. For example, when I am doing this, qtyText.setText(palletLocList.get(0).qty);, it seems to only pull the data from the last record added to the arraylist entered and not the first as I would expect.

As I do more debugging, I have now noticed that when the code adds the second collection of items to the arraylist, it seems to overwrite the first collection of items. So I then have two sets of items that are identical. Any help? Thanks.

As I do more debugging, I have now noticed that when the code adds the second collection of items to the arraylist, it seems to overwrite the first collection of items. So I then have two sets of items that are identical. Any help? Thanks.

Hopefully this will help. This is all the code used where the problem occurs. You can see I made some changes since the last post still coming out with the same issue (both items in the collection are identical).

One problem I'm seeing in your demo is that you only create one PalLoc object. Move the new PalLoc() instruction into the for loop, so that you're adding a different object to the arraylist each time.
I believe what you're doing here is creating one PalLoc object and then repeatedly changing its fields, so it ends up with one object whose Location is Loaction2, quantity is Quantity2, and so forth.