Question: I can only find methods that look for specific elements of an array.

During my objects.each |a| loop, I want to know when I'm at the final element so I can have a loop like:

```
objects.each |a|
   if objects.hasNext()
       puts a.name + ","
   else
       puts a.name

```

Iterator's hasNext() determines if the Array's iterator has another element after the one currently being evaluated.

I want to emphasize that I'm looking to print out these values, not turn them in to an Array. .join is not what I'm looking for here.

Answer: 
It is common that, when leaning a new language, people tend to looking for something that familiar with:) 

Your specific questions could easily be solved by using `each_with_index`. 

```
objects.each_with_index do |object ,index|
    if index == (object.length -1) then 
        puts a.name + ","
    else
        puts a.name
    end
end

```
> 
> Is there a comparable Array operation to Java's hasNext() in ruby?
> 
> 
> 

First of all Java's Array doesn't have any `hasNext` method per se because it wouldn't make any sense. It's the [iterator](http://docs.oracle.com/javase/7/docs/api/java/util/Iterator.html) that has it. In Ruby there's no such a thing as a list and the powerful iterator methods (`each` and the `each_*` family) would make it pretty useless:

```
my_array.each do |current|

    // operations

    // implicit:
    // if (current.has_next) current = current.next
    // else break
end

```

So, no there's no such a thing.

> 
> I'm using .each |a| to run the loop. I want to print a comma each time through unless it's the last. I want this list (pretty, ugly, stupid) not (pretty, ugly, stupid,). Any thoughts
> 
> 
> 

You should take a look at the `.join` method.