Converting PHP code in Java
<p>I'm a PHP programmer starting my adventures in Java and I was trying to create a function in an auction program to award my suppliers (it's something really simple, that I am using just for doing some tests). </p>

<p>As I wasn't finding a way to do this, I decided to write a sketch of how I could possibly do that in PHP and ask you here how could I transform this PHP code into Java:</p>

<pre><code>    $aux = null;
    $val = null;
    foreach (this-&gt;auction-&gt;getBids() as $bid) {
        if ($aux == null) {
            $aux = $bid-&gt;getValue();
        } else {
            if ($bid-&gt;getValue() &gt; $aux) {
                $aux = $bid;
            }
        }
    }
</code></pre>

<p>just because u complained, I was starting doing something like this:</p>

<pre><code>public void award() {
    for (int i = 0; i &lt; this.auction.getBids().size(); i++) {
        this.auction.getBids().get(i).getSupplier().getName();
        this.auction.getBids().get(i).getProduct().getName();
        this.auction.getBids().get(i).getBidTime();
        this.auction.getBids().get(i).getValue();
    }
</code></pre>

<p>I don't know how to do the same thing I can do using Php... something like a foreach, accessing the object...</p>
