You wouldn't have got the classcast if the code was like this :
public class Test { public static void main(String[] args) { Object[] objectArray = new String[2]; objectArray[0] = new String(); objectArray[1] = new String(); String[] addressArray = (String[])objectArray; } }
No holds barred. And no bars holed. Except this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth