Integer.parseInt() and Integer.toString() runtime

Would the runtime of Integer.parseInt(String i) and Integer.toString(int i) both be O(n)?

How can I overcome ArrayIndexOutOfBoundException for Integer.parseInt(args[0])?

I’ve seen below code in one of the video tutorial.There its executes fine but while I’m trying to execute in my system, it is compiling fine but I’m getting runtime error saying, Exception in thread “…