![]() |
syntactic unit > access unit > variable > parameter > command-line argument |
![]() ![]() | ||||
command-line argument | ||||
subject | fact |
command-line argument | has example of use java EchoArgs Tim John "Pamela Sue" Fred 25 | ![]() |
is a parameter of a main method | ![]() | |
is a subtopic of Methods | ![]() | |
is stored in an array of strings and passed to the main method | ![]() | |
is a kind of parameter | ![]() | |
should be surrounded by quotations marks if the argument is more than one word long | ![]() | |
parameter | can have the same name as a member variable | ![]() |
has purpose to transmit a primitive datum or object reference to a method or constructor | ![]() | |
is initialized by calling the method or constructor or exception handler | ![]() | |
is passed by value | ![]() | |
variable | can be accessed by other variables and methods in any class in the same package by default ![]() | ![]() |
can contain different classes of objects depending on the type of the variable | ![]() | |
can contain only values that are of the same type as the variable or a subtype of the variable's type | ![]() | |
can have an interface as its type which means that, with the variable, you can invoke any operation supported by the interface ![]() | ![]() | |
can refer to a particular object, several different objects during the execution of a program, or no object at all ![]() | ![]() | |
has 1 value at any one time which is the that it refers to | ![]() | |
has 1 name | ![]() | |
has scope which is the block in which it is declared | ![]() | |
has type ![]() | ![]() | |
has lifetime which is the time its block is being executed | ![]() | |
has scope | ![]() | |
has part value | ![]() | |
is declared by giving the data type followed by the name of the variable ![]() | ![]() | |
is destroyed in the block where it is declared | ![]() | |
may have access modifier | ![]() | |
refers to a class or an object or a primitive datum | ![]() | |
should have comment if it is non-obvious | ![]() | |
access unit | has access mode | ![]() |
syntactic unit | has syntax rule bold = mandatory | ![]() |
Next parameter: exception-handler parameter Up: parameter Previous parameter: applet parameter