ไวยกรณ์ภาษาจาวา Control Structure


ไวยกรณ์ภาษาจาวา Control Structure



ไวยกรณ์ภาษาจาวา Control Structure


1.แบบ Sequential (แบบลำดับ)

1.1 Sequential (แบบลำดับ)


อาจประกอบด้วยคำสั่งเดียว หรือทำงานร่วมกับ if-thenหรือ Loop ต่างๆ



2.แบบ Selection (แบบเลือก)


2.1 Selection->if-then

2.2 Selection->if-then-else





2.3 Selection->if-if-if


2.4 Selection->case




3.แบบ Loop (แบบทำซ้ำ)

3.1 PRE-TEST (WHILE)





3.2 POST-TEST (Do..While)


3.3 AUTOMATIC COUNTER (FOR)


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

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