วันจันทร์ที่ 10 ธันวาคม พ.ศ. 2555


2.6 การเรียกใช้ attributes


subject:การเรียกใช้ attribute แบบที่ 1
syntax:ClassName object = new ClassName().attributeName;
example:Person bamboo = new Person().name

subject:การเรียกใช้ attribute แบบที่ 2
syntax:ClassName object = new ClassName();
object.attributeName;
example:Person bamboo = new Person();
bamboo.name = "bamboolabcode"

ไม่มีความคิดเห็น:

แสดงความคิดเห็น