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

1. method

1.1. accessibility

1.1.1. Default

1.1.2. public

1.1.3. private

1.1.4. protected

1.2. modifier

1.2.1. static

1.2.2. nonstatic

1.3. void return

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

1.5. constructor method

1.5.1. มีชื่อเดียวกับชื่อคลาส การเรียกใช้                   1.เพื่อสร้าง object     =>    Class c1=new Class(); 2.เพื่อสั่งให้กำหนดค่าเริ่มมต้น new Class();              ถ้ามีมากกว่า 1 constructor การรับค่าพารามิเตอร์ต้องไม่เหมือนกัน (overloading constructor)

2. ตัวแปร Variable

2.1. accessibility

2.1.1. Default

2.1.2. public

2.1.3. private

2.1.4. protected

2.2. modifier

2.2.1. static

2.2.2. non static

2.3. data type

2.3.1. int

2.3.2. double

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

2.4.1. public static int a=2;

2.5. ตำแหน่งของตัวแปรมี 4 ตำแหน่ง

2.5.1. local

2.5.2. field

2.5.3. field in type

2.5.4. class

2.5.5. parameter

3. แนวคิดของการโปรแกรมเชิงวัตถุ(OOP Concepts)

3.1. การปกป้อง(Encapsution)defult public private protected คือการรวมกลุ่มของข้อมูล และกลุ่ม

3.2. การสืบทอด (Inheritance)extends imprement คือการยอมใ้นำไปใช้ หรือเขียนขึ้นมาทดแทนของเดิม

3.3. การพ้องรูป(Polymorphism) มาจากภาษากรีก หมายถึง หลายรูป (Many Shapes) ซึงมีหลักการอยู่ 2 อย่าง

3.3.1. Overloading

3.3.1.1. ชื่อเมธอดเหมือนกัน , ตัวแปลไม่เหมือนกัน

3.3.2. Overriding

3.3.2.1. ชื่อเมธอดและตัวแปรเหมือนกัน , เพื่อสร้างเหตุการณ์ขึ้นมาใหม่