Phil Hunter
Phil Hunter

Reputation: 315

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?

Upvotes: 0

Views: 145

Answers (2)

Costis Aivalis
Costis Aivalis

Reputation: 13728

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

Upvotes: 0

Joachim Sauer
Joachim Sauer

Reputation: 308031

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.

Upvotes: 11

Related Questions