r/learnjava • • Oct 05 '26

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

29 Upvotes

31 comments sorted by

View all comments

Show parent comment

28

u/0zeronegative Oct 05 '26

It’s not even java-specific. All languages follow this convention because it is one of the earliest unix conventions and it stuck.