I am trying to detect whether the 'a' was entered as the first string argument.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Command-line arguments are passed in the first
String[]
parameter tomain()
, e.g.In the example above,
args
contains all the command-line arguments.The short, sweet answer to the question posed is:
Every Java program starts with
That array of type
String
thatmain()
takes as a parameter holds the command line arguments to your program. If the user runs your program asthen
args[0]
will hold the String "a".