开发者

What does this line of code do?

String usage = "IndexHTML [-create] [-index <index>] <root_directory>";
开发者_运维知识库

What does this line do in my IndexHTML.java file?


It defines either a local variable or a field (depending on its location) named usage of type String with the value "IndexHTML [-create] [-index <index>] <root_directory>".

It looks like it's meant for a short error/help message about how to run the class. It means that the class (when started from the command line) takes an optional -create flag, an optional -index option with an argument and that you need to specify the root directory.


If you search around you will find also an if checking the contents and size of your args array.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜