Get Started. It's Free
or sign up with your email address
Class by Mind Map: Class

1. เมธอด method

1.1. ลักษณะของเมธอด

1.1.1. 1.accessibility

1.1.2. 2.modifier

1.1.2.1. static

1.1.2.2. non - static

1.1.3. 3.void return

1.1.3.1. รับ/ไม่รับ parameter

1.2. Constructor method

1.2.1. เมธอดที่มีชื่อเดียวกับ class

1.2.2. การเรียกใช้

1.2.2.1. 1.เพื่อสร้าง object

1.2.2.1.1. Class1 c1=new Class1();

1.2.2.2. 2.เพื่อสั่งให้กำหนดค่าเริ่มต้น

1.2.2.2.1. new Class();

1.2.2.3. 3.มากกว่า 1 constructor

1.2.2.3.1. การรับค่า parameter  ต้องไม่เหมือนกัน (overloadding constructor)

1.3. ประเภทของ method

1.3.1. 1.life cycle

1.3.1.1. main/oncreate  สั่งทำงาน

1.3.2. 2.ธรรมดา

1.3.2.1. มี body

1.3.3. 3.abstract

1.3.3.1. มีแต่ชื่อ

1.3.4. 4.constructor

1.3.4.1. ชื่อเดียวกับคลาส

1.4. การดึง method มาทำงาน

1.4.1. 1.สร้าง object ของ class นั้น

1.4.1.1. 1.class ธรรมดา    c2

1.4.1.2. 2.abstract class                                                 จะ imprement abstrat method เข้ามา    c3

1.4.1.3. 3.interface class                                                       จะ imprement abstrat method เข้ามา    c3

1.4.2. 2.การ inheritance เพื่อถ่ายทอดคุณสมบัติ

1.4.2.1. 1.class  ธรรมดา extends

1.4.2.2. 2.abstract class extends

1.4.2.3. 2.interface class impremect

2. ประเภทของ class

2.1. 1.มี main

2.2. 2.ไม่มี main

2.3. 3.abstract class

2.3.1. 1. method ธรรมดา

2.3.2. 2. abstract method

2.4. 4.interface class

2.4.1. 1. abstract method

3. ตัวแปร variable

3.1. ลักษณะของตัวแปร

3.1.1. 1.accessibility

3.1.1.1. default

3.1.1.2. public

3.1.1.3. private

3.1.1.4. protected

3.1.2. 2.modifier

3.1.2.1. static

3.1.2.1.1. 1.เรียกโดยตรง

3.1.2.1.2. 2.ใช้ object เรียก

3.1.2.2. non - static

3.1.2.2.1. 1.ใช้ object เรียก

3.1.3. 3.data type

3.1.3.1. int

3.1.3.2. double

3.1.3.3. string

3.1.3.4. ...

3.1.4. 4.assign value

3.1.4.1. public static int a=2

3.1.4.2. ...

3.2. ตำแหน่งของตัวแปร

3.2.1. 1.local

3.2.1.1. อยุ่ใน {}

3.2.2. 2.field

3.2.2.1. อยู่นอก {} แต่อยู่ใน void

3.2.3. 3.field in type

3.2.3.1. อยู่นอก void (class)

3.2.4. 4.parameter

3.2.4.1. รอรับค่า parameter