There is no need to use
String[] array = (String[]) null;
You might have to use (String[]) null if you pass a null value to an overloaded method (i.e. one of multiple methods having the same name) and you want the method that accepts a String[] argument to be chosen by the compiler.
For example, if you have the following methods :
public void doSomething (Integer i) {}
public void doSomething (String s) {}
public void doSomething (String[] arr) {}
Calling doSomething (null) will not pass compilation, since the compiler won't know which method to choose.
Calling doSomething ((String[]) null) will execute the 3rd method.
Of course, you can assign the null to a String[] variable, and avoid the casting :
String[] arr = null;
doSomething (arr);
nullin te first place! Doing so will force you to do null checks later which are not needed otherwise.