Basic type: Basic type Naturally, it is a number, a character, or a Boolean value.
Reference type: Is an object type, what is the value. Its value is a reference to the memory space, which is the address that holds the variable represented in the memory of a
Base type passes are all values passed
Reference type passing belongs to the reference Pass, the reference type is the object type, but must not include string
reference passing and value passing
reference type: In addition to the function when passing a value is a "reference pass", in any "=" to the object variable to assign a value is "reference pass."
Value Delivery: The basic type of delivery is a value transfer, as in C language, when the basic data types of Java (such as int,char,double, etc.) as entry parameters to the function body, the incoming parameter in the function body into a local variable, This local variable is a copy of the input parameters, all functions within the body of the operation is for this copy of the operation, the function is finished, the local variable also completes its mission, it does not affect as input parameters of the variable. Parameter passing in this way is referred to as "value delivery."
/*define a class*/
class mydate{
string year;
string Mo nth;
string Day;
string Date;
Public mydate () {
year = "1900";
Month = "01";
day = "01";
Date = year + "." + Month + "." + Day;
}
public String toString () {
return Date;
}
}