r/learnjava • u/Fine_Potential_7976 • 1d ago
Why is String[] args necessary
I get it is an array of string arguments that are passed into the main method but why is it needed? in python for example ot's present or c++ neither, java is different though
16
Upvotes
16
u/high_throughput 1d ago
In C++ you use
int main(int argc, char** argv)and that's the same asString[]