Java   View all facts   Glossary   Help
syntactic unit > access unit > variable > parameter > method parameter
Next parameterapplet parameter    Upparameter    Previous parameterexception-handler parameter   

method parameter
subjectfact 
method parameter added by: JK, source: On To Java, 2001-10-19 11:37:25.0
has example
//Example of 2 method parameters, one integer and one array, shown in bold
public static Movie[] readData(int number, Movie[] movies) {
...
}
added by: JK, source: On To Java, 2001-10-19 11:37:25.0
has purpose to pass values into methodsadded by: DS, source: Sun Java Tutorial, 2001-10-19 11:37:25.0
hides instance variable of the classadded by: DS, source: Sun Java Tutorial, comment: i.e. if they have the same name, 2001-10-19 11:37:25.0
is a subtopic of Methods2001-10-19 11:37:25.0
is a kind of parameteradded by: DS, source: Sun Java Tutorial, 2001-10-19 11:37:25.0
parametercan have the same name as a member variable2001-10-19 11:37:39.0
is initialized by calling the method or constructor or exception handler2001-10-19 11:37:39.0
is passed by value2001-10-19 11:37:39.0
variablecan be accessed by other variables and methods in any class in the same package by default    2001-10-19 11:38:12.0
can contain different classes of objects depending on the type of the variable2001-10-19 11:38:12.0
can contain only values that are of the same type as the variable or a subtype of the variable's type2001-10-19 11:38:12.0
can have an interface as its type which means that, with the variable, you can invoke any operation supported by the interface    2001-10-19 11:38:12.0
can refer to a particular object, several different objects during the execution of a program, or no object at all    2001-10-19 11:38:13.0
has 1 value at any one time which is the that it refers to2001-10-19 11:38:13.0
has 1 name2001-10-19 11:38:13.0
has scope which is the block in which it is declared2001-10-19 11:38:13.0
has type    2001-10-19 11:38:13.0
has lifetime which is the time its block is being executed2001-10-19 11:38:13.0
has scope2001-10-19 11:38:13.0
has part value2001-10-19 11:38:13.0
is declared by giving the data type followed by the name of the variable    2001-10-19 11:38:13.0
is destroyed in the block where it is declared2001-10-19 11:38:13.0
may have access modifier 2001-10-19 11:38:13.0
refers to a class or an object or a primitive datum2001-10-19 11:38:13.0
should be as private as possible2001-10-19 11:38:13.0
should have comment if it is non-obvious2001-10-19 11:38:13.0
access unithas access mode2001-10-19 11:35:59.0
syntactic unithas syntax rule
bold = mandatory
italic = non-terminal
normal font = optional
2001-10-19 11:38:04.0

Next parameterapplet parameter    Upparameter    Previous parameterexception-handler parameter