Does Java have any possibility of c# equal syntax
class MyClass{
private int[] array = new int[20];
public int this[int index] { get{ return array[i];}} //<-- array getter for object
}
MyClass test = new MyClass();
Console.WriteLine(test[0]);
( Code is just example ;) )