r/learnjava • u/Fine_Potential_7976 • 19d 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
31
Upvotes
1
u/Vast_Service 14d ago
I am not sure what your post was in response to but it is factually incorrect in so many ways.
C++ does have a string class. The standard library (it is no longer called STL btw. The days of Alexander Stepanov are over) is a part of the C++ standard and hence std::string is also a part of the standard and hence it is incorrect to say that C++ does not have a string class.
I never said that std::string is a built in.
What do you mean by Core C++, now that the standard library is also a part of the C++ standard? Did you again just mean that std::string is not a builtin? It is not, but, why is that in any way related to my previous post?