1 / 5

Tipe data Primitive dan Non Primitive

Oleh : Luh Putu Ayu Prapitasari , MSc . Tipe data Primitive dan Non Primitive. Tipe Data Primitive dan Non-Primitive. Primitive : tipe data dasar yang disediakan oleh bahasa pemrograman (Java) = tipe data built-in

felice
Download Presentation

Tipe data Primitive dan Non Primitive

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Oleh: LuhPutuAyuPrapitasari, MSc. Tipe data Primitive dan Non Primitive

  2. Tipe Data Primitive dan Non-Primitive • Primitive: tipe data dasar yang disediakanolehbahasapemrograman (Java) = tipe data built-in Pada Java, terdapat 8 tipe data primitive: int, char, boolean, short, long, float, doubledanbyte. Selain 8 tipe data tersebut, voidjugaditambahkankegrupini. • Non-Primitive: disebutjugareference type, karena me-refer/merujukkesuatualamatmemoritertentu, kelokasitempatpenyimpanan data. Pada Java, tipe data non-primitive iniadalaharraydanclass.

  3. Class • Terdapatbeberapa class yang disediakanuntukmelakukanaksesdanmanipulasiterhadaptipe data primitive, yakni: Integer  int Character  char Boolean  boolean Short  short Long  long Float  float Double  double Byte  byte Void  void

  4. Kelas-kelasinidisediakansebagaipembungkus (wrapper) tipe data primitive-nyadanmemilikibeberapa method yang bisadigunakanuntukmanipulasi data. Contoh: Padaclass Double, terdapat method parseDouble(Stringstring) yang berfungsiuntukmenguraikan (parsing) string kedalamtipe double. Lengkapnyatentangkelas Double dapatdilihatdi: http://developer.android.com/reference/java/lang/Double.html Dan info lengkaptentangkelas-kelas yang disediakandi Android dapatdilihatdi: http://developer.android.com/reference/java/lang/package-summary.html

  5. Contoh program

More Related