Decided to edit this question.
(String) refers to casting.
Ex:
protected String methodA(Vector X) {
return (String) X.get(0);
}
In this case the get method returns an object, and for the methodA to return a String there needs to be a cast to String. And the cast is done as demonstrated.