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

前端 未结 7 1796
感情败类
感情败类 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:59

    One case I can think of is, when you want to have a command line driven interface for your software along with the GUI. An example is the Android tools, all of them have console driven interfaces.

提交回复
热议问题