Presentation is loading. Please wait.

Presentation is loading. Please wait.

Author: Takdir, S.ST. © Sekolah Tinggi Ilmu Statistik.

Similar presentations


Presentation on theme: "Author: Takdir, S.ST. © Sekolah Tinggi Ilmu Statistik."— Presentation transcript:

1 Author: Takdir, S.ST. © Sekolah Tinggi Ilmu Statistik

2 When objects is assigned to variables, or pass as arguments to methods, references are being passed to those objects, not the objects themselves or copies of those objects.

3 Author: Takdir, S.ST. © Sekolah Tinggi Ilmu Statistik When a simple type is passed to a method, it is done by use of call-by-value. Objects are passed by use of call-by- reference.

4 Author: Takdir, S.ST. © Sekolah Tinggi Ilmu Statistik To compare instances of class and have meaningful results, we have to implement special methods in our class, and we have to call those methods using those method names.

5 Author: Takdir, S.ST. © Sekolah Tinggi Ilmu Statistik copy() method and the clone() method. copy() method and the clone() method. The clone() method is similar to copy(), except that clone() takes no arguments The clone() method is similar to copy(), except that clone() takes no arguments

6 Author: Takdir, S.ST. © Sekolah Tinggi Ilmu Statistik The scope of a nested class is bounded by the scope of its enclosing class. Thus, if class B is defined within class A, then B is known to A, but not outside of A. The scope of a nested class is bounded by the scope of its enclosing class. Thus, if class B is defined within class A, then B is known to A, but not outside of A. Static and non-static Static and non-static Static nested class cannot refer to members of its enclosing class directly. Because of this restriction, static nested classes are seldom used. Static nested class cannot refer to members of its enclosing class directly. Because of this restriction, static nested classes are seldom used. An inner class is a non-static nested class. It has access to all of the variables and methods of its outer class and may refer to them directly in the same way that other non-static members of the outer class do. An inner class is a non-static nested class. It has access to all of the variables and methods of its outer class and may refer to them directly in the same way that other non-static members of the outer class do.

7 Author: Takdir, S.ST. © Sekolah Tinggi Ilmu Statistik


Download ppt "Author: Takdir, S.ST. © Sekolah Tinggi Ilmu Statistik."

Similar presentations


Ads by Google