public class ObjectArrayTypecast {

  public static void main(String[] args) {
  
    Object[] objects;
    String[] strings = { "A", "B", "C", "D" };
    
    objects = strings;
    for (Object o : objects) System.out.println(o);
    
    strings = null;
    strings = (String[]) objects;
    for (String s : strings) System.out.println(s);
  }
}