31. How can you provide parameters to a program during
execution time?
Answers
Answered by
2
Explanation:
To pass arguments to the jar:
java -jar myjar.jar one two
You can access them in the main() method of "Main-Class" (mentioned in the manifest.mf file of a JAR).
String one = args[0];
String two = args[1];
Similar questions
Math,
3 months ago
Math,
7 months ago
English,
7 months ago
Political Science,
11 months ago
World Languages,
11 months ago