public class Test { public static void main(String[] args) { String[] y = null; if(args.length>0) { y = args; y = null; } else { y = args; } } }