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

1. 1.Class เป็นที่เก็บ

1.1. 1.ตัวแปร variable

1.2. 2.method function

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

2.1. 1.accessibility

2.1.1. Default (ไม่เขียน)

2.1.2. Pubulic

2.1.3. Private

2.1.4. protected

2.2. 2.method

2.2.1. static

2.2.2. non - static

2.3. 3.data type ประเภท

2.3.1. เช่น

2.3.1.1. int

2.3.1.2. doubie

2.4. 4.assign value การกำหนดค่า

2.4.1. public static int a=2

3. 3.ลักษณะของเมธคอล

3.1. 1.accessibility

3.2. 2.modifier

3.2.1. static

3.2.2. non - static

3.3. 3.void return

3.4. 4.รับ/ไม่รับค่าพารามิเตอร์

4. 4.Constructor method

4.1. 1.เมธอลที่ชื่อเดียวกับคลาส

4.2. 2.การเรียกใช้ constructor method

4.2.1. 1.เพื่อสร้าง object Class c1=new Class();

4.2.2. 2.เพื่อสั่งให้กำหนดค่าเริ่มต้น new Class();

4.3. 3.ถ้ามีมากกว่า 1 คอนสตักเตอร์ การรับพารามิเตอร์ต้องไม่เหมือนเดิม (overloading constructor)

5. 5.ตำแหน่งของตำแปร

5.1. 1. local / field /field in type...(class)/parameter.

5.1.1. Create local variable 'X'

5.1.2. Create field 'X'

5.1.3. Create field 'X' in type 'MainActivity'

5.1.4. Create parameter 'X'

6. 6.ประเภทของคลาส

6.1. มี 4 ประเภท

6.1.1. 1.มี main,oncreate

6.1.1.1. 1.ตัวแปร

6.1.1.2. 2.method(function)

6.1.1.3. 3.มี main , oncreate

6.1.2. 2.ไม่มีเมน

6.1.2.1. 1.ตัวแปร

6.1.2.2. 2.method(funcreate)

6.1.3. 3.abstract

6.1.3.1. 1.abstract method

6.1.3.2. 2.method ธรรมดา

6.1.4. 4.interface

6.1.4.1. 1.abstract method

7. 7.ประเภทของเมธอล

7.1. 4 ประเภท

7.1.1. 1.life cycle (main , oncreate) สั่งทำงาน

7.1.2. 2.ธรรมดา มี body

7.1.3. 3.abstract มีแต่ชื่อ

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

8. 8.คลาสที่มี main oncreate เรียกเมธอลของคลาสอื่นมาทำงาน

8.1. วิธีที่ 1. สร้าง object ของคลาสนั้น เพื่อเรียกเมธอล

8.1.1. 1.คลาสธรรมดา c2

8.1.2. 2.abstract class (จะ implement method เข้ามา) c3

8.1.3. 3.interface class (implement abstract method เข้ามา) c4

8.2. วิธีที่ 2

8.2.1. ธรรมดา ใช้ extends

8.2.2. abstract class ใช้ extends จะ implement abstract

8.2.3. interface class ใช้ implement จะ implement abstract method เข้ามา