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. 4. Constructor method

2.1. 1. เมธอด

2.2. 2. การเรียกใช้  Constructor method

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

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

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

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

3.1. มีกี่ประภทอะไรบ้าง

3.1.1. 1. มี  main,oncreate

3.1.1.1. 1. ตัวแปล

3.1.1.2. 2. method ( function )

3.1.1.3. 3. มี  main,oncreate

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

3.1.2.1. 1. ตัวแปล

3.1.2.2. 2. method ( function )

3.1.3. 3. abstract

3.1.3.1. 1. abstract ( method )

3.1.3.2. 2.method ธรรมดา

3.1.4. 4. interface

3.1.4.1. 1. abstract ( method )

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

4.1. 4 ประเภท

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

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

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

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

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

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

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

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

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

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

5.2.1. 1. ธรรมดา ใช้การ extends

5.2.2. 2. Abstract class ใช้การ extends ( จะ implement abstract method เข้ามา )

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

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

6.1. 1. Accessibility

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

6.1.2. - Public

6.1.3. - Private

6.1.4. - Protected

6.2. 2. Method

6.2.1. - Static

6.2.2. - Non Staic

6.3. 3. Data type ประเภท

6.3.1. เช่น

6.3.1.1. - Int

6.3.1.2. - Double

6.4. 4. Assign value  การกำหนดค่า

6.4.1. public static int a=2;

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

7.1. มี 4 ลักษณะ

7.1.1. 1. Accessibility

7.1.2. 2. Modifier

7.1.2.1. - Static

7.1.2.2. - Non Static

7.1.3. 3. Void retum

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

8. 5. ตำแหน่งของตัวแปล

8.1. 4 ตำแหน่ง

8.1.1. - Create local variable 'x'

8.1.2. - Create field 'x'

8.1.3. - Create field 'x' in type 'MainActivity'

8.1.4. - Create parameter 'x'