I have an array of type Object in which I am saving object of different types, I want to cast them back their specific types after I take them out of the array. So when I take the PrintWriter object out I try PrintWriter(objArray[1][2]), but this does not work, how can I do this.