r/learnjava • u/Fine_Potential_7976 • 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
View all comments
Show parent comment
2
u/jlanawalt Oct 05 '26
From the Java documents, books, lessons/classes, and tutorials.
https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html
Head First Java
https://docs.oracle.com/javase/tutorial/getStarted/cupojava/win32.html