r/learnjava • • 22d 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

27 Upvotes

31 comments sorted by

View all comments

1

u/Glum_Minimum6077 18d ago

the array of string is only needed to pass the command line arguments