// if the array is not empty and the first element equals a if (args.length > 0 && args[0].equals("a")) { System.out.println("it's ok"); }
// if the array is not empty if (args.length > 0) { if (args[0].equals("a")) { System.out.println("First parameter is ok"); } if (args[1].equals("b")) { System.out.println("Second parameter is ok"); } if (args[2].equals("cd")) { System.out.println("Third parameter is ok"); } }