[Solved] args[0]==null Exception in thread “main” java.lang.ArrayIndexOutOfBoundsException: 1 at Main.main(Main.java:69)

Without knowing the details of your code, I would suggest you to check the size of args first: if(args.length> 0) { //It depends on the size of the argument you wanna check. //Might be args.length > 1 if you wanna make sure at least 2 elements in the args array //doSomething } else { //doSomethingElse … Read more

[Solved] args and up? javasript

To do this, you can use slice on the array (assuming it’s an array — using {} is for objects, which isn’t valid for this). args = [“!say”, “pineapples”, “are”, “cool!”] // As an array console.log(args.slice(1)); // To string console.log(args.slice(1).join(” “)); solved args and up? javasript