Hello how do I change it so I don't get the error mentioned above? I don't know how to add or declare args[0]
before.
public class DN02 {
public static void main(String[] args) {
if (args[0] == "1") {
for (int x = 1; x < args.length - 1; x++) {
if (x == args.length - 2) {
System.out.print(args[x]);
} else {
System.out.print(args[x] + ", ");
}
}
} else {
System.out.println("**");
System.out.println("* " + args + " *");
System.out.println("**");
}
}
}