is this following code valid?

QMPS.sendLocationRequest("nypsg","nyp654sg",(String)phoneNo.elementAt(phoneNo.size()-1),"2");

QMPS is another file,which i have called here.

is this line valid?
(String)phoneNo.elementAt(phoneNo.size()-1)
wat does elementAt mean and wat does it do?