J.A.V.A (OOP) Flashcards
1
Q
Variable
A
reference to a object
2
Q
M: .Clone
A
used to make a copy |
EX:
p3 = p2;
p3 = p2.clone( `)
3
Q
Parameter Passing
A
Consider the code: Greeter.setName(“Mars”);
Object Ref on which you invoke a method is called Implicit para.
Item passed to a method in the parentheses are called explicit para
4
Q
Implicit Para
A
To USE the implicit you must use the special name : “THIS”.
_______________
Code EX: public class Greeter {private String name;
public void setName (String name)
this.name = name;
}
}