Here is a great tutorial by Java, on the exception mechanism used within the framework.
What Is an Exception? (The Java™ Tutorials > Essential Java Classes > Exceptions)
The error you're encountering states the following.
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
at Programa01.main(Programa01.java:11)
This is caused by an Exception which was thrown by one of the statements.
The first line here, outlines the type of Exception, in this case an ArrayIndexOutOfBoundsException.
Which is followed by a message—optional, although will sometimes includes relative information.
In this case it states the following.
Index 0 out of bounds for length 0
Firstly, you'll need to determine how to locate the error.
The last line in the error includes the line-number of which the error occurred.
In this case it is line 11, as denoted within the parentheses, after the .java file-extension.
at Programa01.main(Programa01.java:11)
If you look at line 11, you'll find the following code.
NumInt = Integer.parseInt(args[0]);
There are a few statements in this line.
Firstly, you have the NumInt assignment.
NumInt =
Additionally, you have the Integer#parseInt method call.
Integer.parseInt()
And, finally, you have the args array access.
In which your syntax is specifying a resolve to index 0.
args[0]
Since the Exception that was thrown is an ArrayIndexOutOfBoundsException, we can presume that the logic propagates from this final statement, the args array access.
Thus, index 0 of the args array is inaccessible, since the length of args is 0—it contains no elements.
The args parameter is an argument which is supplied and populated by the Java Virtual Machine upon the start of your program.
Here is a tutorial on Command-Line Arguments.
Command-Line Arguments (The Java™ Tutorials > Essential Java Classes > The Platform Environment).
Since you're using VSCode, you can refer to the following tutorial on adding Launch Configurations.
VisualStudio.com – Debugging in Visual Studio Code.
If you need more assistance on adding the values, feel free to leave a comment.