+ 3
String args[], which is actually an array of java.lang.String type, and it's name is args here. It's not necessary to name it args always, you can name it whatever you like, but most programmer prefer to name it args. When we run a Java program from command prompt, we can pass some input to our Java program. Those inputs are stored in this String args array.User can enter any type of data from the command line can be Number or String & necessary to accept it by the compiler which datatype we should have to use? String is the datatype which supports all of the primitive datatypes like int, long, float, double, byte, shot, char in Java. You can easily parse it in any primitive datatype.
31st Jan 2018, 3:06 AM
Sunil Thakali
Sunil Thakali - avatar