What's the point of String[] args in Java?

前端 未结 7 1894
感情败类
感情败类 2021-01-17 06:50

Whenever you declare the main method in a class, you always have to do a String array called \"args\". What\'s the point? Unless I live under a rock, command li

7条回答
  •  没有蜡笔的小新
    2021-01-17 06:51

    A Java application can accept any number of arguments from the command line. This allows the user to specify configuration information when the application is launched. (From Command-Line Arguments) and as everyone else said here, it is the way it is!

    For gods sake,Please Don't say if I don't need this ,no-one else need this! :)

提交回复
热议问题