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

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

1.1. มี 4 ตำแหน่ง

1.1.1. local

1.1.2. filed

1.1.3. field in type...(class)

1.1.4. parameter

1.2. Create local variable 'x'

1.3. Create field 'x'

1.4. Create field 'x' in type 'MainActivity'

1.5. Create parameter 'x'

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

2.1. 1.มี main,oncreate

2.1.1. 1.ตัวแปร

2.1.2. 2.method(function)

2.1.3. 3.มี main,oncreate

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

2.2.1. 1. ตัวแปร

2.2.2. 2.method(function)

2.3. 3.abstract

2.3.1. 1.abstract method

2.3.2. 2.method ธรรมดา

2.4. 4.interface

2.4.1. 1.abstract method

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

3.1. มี 4 ประเภท

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

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

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

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

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

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

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

4.1.2. 2.Abstract class (จะ implement abstract method เข้ามา)

4.1.3. 3.interface class  (จะ implement abstract method เข้ามา)

4.2. วิธีที่ 2 การถ่ยทอดคุณสมบัติ inheritance ใช้ c1

4.2.1. 1.ธรรมดา

4.2.1.1. ใช้การ extends

4.2.2. 2.Abstract class

4.2.2.1. ใช้การ extends จะ implement abstract method เข้ามา

4.2.3. 3.interface class

4.2.3.1. ใช้การ implement จะ implement abstract method เข้ามา

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

5.1. 1.accessibility

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

5.1.2. public

5.1.3. private

5.1.4. protected

5.2. 2.method

5.2.1. static

5.2.2. non static

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

5.3.1. เช่น

5.3.1.1. int

5.3.1.2. double

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

5.4.1. public static int a=2;

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

6.1. มี 4 ลักษณะ

6.1.1. 1.accessibility

6.1.2. 2.Modifier

6.1.2.1. static

6.1.2.2. non static

6.1.3. 3.void return

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

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

7.1. 1.ตัวแปร variable

7.2. 2.method function

8. 4.Constructor method

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

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

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

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

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