Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Quiz_Java

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

การประกาศตัวแปรแบบนี้ ถูก หรือ ผิด

char ch = "Hello";

a)

ถูก

b)

ผิด

2.

operator ในข้อใด มีความสำคัญน้อยที่สุด

a)

-

b)

+

c)

=

d)

(),[]

3.

โปรแกรมนี้ให้ผลลัพธ์อย่างไร

a)

Hello World

b)

HelloWorld

c)

Hello

World

d)

Error

4.

โปรแกรมนี้ให้ผลลัพธ์อย่างไร

a)

3 + 5 = 3 + 5

b)

3 + 5 =

8

c)

3 + 5 =

3 + 5

d)

3 + 5 = 8

5.

โปรแกรมนี้ให้ผลลัพธ์อย่างไร

a)

4 + 13

b)

413

c)

1 + 3 1 3

d)

1 + 313

6.

คำสั่งนี้ให้ผลลัพธ์อย่างไร

int x = 2, y = 5;

double z = 1.5;

System.out.println(3 + (x + y) * (z + 1));

a)

20

b)

20.5

c)

25

d)

102.5

7.

โปรแกรมนี้จะแสดง "หนูจะไม่นอนหลับในห้องเรียนอีกแล้วค่ะ" กี่ครั้ง

a)

12

b)

11

c)

10

d)

9

8.

ถ้ามีการรับค่าจากแป้นพิมพ์เป็น "50" จากโปรแกรมนี้จะแสดงผลลัพธ์อย่างไร

a)

fail

b)

pass

c)

error

d)

วนลูปไม่รู้จบ

9.

ผลรันของโปรแกรมนี้ ตรงกับข้อใด

a)

EnjoyBye

b)

EnjoyEvening

c)

EnjoyEveningBye

d)

GoodDayBye

10.

ผลรันของโปรแกรมนี้ ตรงกับข้อใด

a)

Hello

World

WoW

b)

Hello

WorldWoW

c)

HelloWorld

WoW

d)

HelloWorldWoW