is there an equivalent to C# indexer in java
<p>I want to do this in java. is it possible?</p>

<pre><code>public string this[int pos]
    {
        get
       {
            return myData[pos];
        }
        set
       {
            myData[pos] = value;
        }
    }
</code></pre>
