Skip to content
  • Home
  • Java
    • Pengertian Bahasa Java
    • Statement Java
    • Input Data
    • Percabangan IF
      • Coding Percabangan IF
    • Inheritance
      • Coding Inheritance
    • Polimorfisme
      • Coding Polimorfisme
    • Object Oriented Program
      • Class Dasar
    • Array
      • Coding Array
    • Looping
      • Coding Looping
    • Form
    • Constructor
      • Coding Constructor
    • Enkapsulasi
      • Coding Enkapsulasi
  • Contact Us

Garasi IT

All about Technology

Coding Enkapsulasi

undefined

1. Mengambil data dengan Constructor (this.)
2. Keluarkan data dari method dengan menggunakan return.

undefined

MAIN FILE
1. Instansiasi nama class menjadi ‘hasil’ serta mengisi nilai parameter nya.
2. Panggil method yang ada di class dengan menggunakan Get (Mutator).

Share this:

  • Share on X (Opens in new window) X
  • Share on Facebook (Opens in new window) Facebook
Like Loading...
Create a website or blog at WordPress.com
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Subscribe Subscribed
    • Garasi IT
    • Already have a WordPress.com account? Log in now.
    • Garasi IT
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Copy shortlink
    • Report this content
    • View post in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...
 

    %d
      Design a site like this with WordPress.com
      Get started