wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

สอบกลางภาค JAVA เรียนที่ 1/2562

Total questions: 15

Worksheet time: 1hrs 15mins

Name
Class
Date
1.

ในภาษาจาวานั้นจะใช้เครื่องหมายใดเป็นการบอกว่าจบ statement

a)

period

b)

parenthesis

c)

semicolon

d)

ending brace

2.

ข้อใดต่อไปนี้ไม่ใช้สแตตเมนต์การกำหนดค่าข้อมูลในภาษาจาวา

a)

total = 9;

b)

72 = amount;

c)

profit = 129;

d)

letter = ‘W’

3.

ตัวอักขระตัวใดใช้ในการเริ่มต้นเขียนคำอธิบายแบบหลายบรรทัด

a)

//

b)

/*

c)

*/

d)

/**

4.

โปรแกรมภาษาจาวาประเภทใดที่นำไปรันบนเว็บได้

a)

Applet

b)

Joption

c)

Command Prompt

d)

Console Applications

5.

ในการเขียนโปรแกรมภาษาจาวา เมื่อ compileโปรแกรม แล้วจะเป็นนามสกุลอะไร

a)

.OBJ

b)

.BAS

c)

.JAVA

d)

.CLASS

6.

X= 2*(5+(17%3/2)); จากคำสั่ง X มีค่าเท่าไร

a)

11

b)

12

c)

14

d)

18

7.

ข้อใด ตั้งชื่อตัวแปร ผิดหลักไวยกรณ์

a)

1Name

b)

Name1

c)

Name_1

d)

N_Nam

8.

ตัวแปรชนิดใด สามารถเก็บค่าตัวเลขทศนิยมได้

a)

Int

b)

Char

c)

String

d)

Double

9.

ข้อใดไม่ถูกต้องในการใช้ println

a)

System.out.println(A + “Hello World”);

b)

System.println.out(value);

c)

System.out.println(“ ”+value);

d)

มีมากกว่าหนึ่งข้อ

10.

int a,b;

double y;

b = 15;

a = 2;

y=b % a;

System.out.println(“ y = ” + y);

จากคำสั่งข้างต้นผลลัพธ์คือข้อใด

a)

1

b)

7

c)

y=1

d)

y=7

11.

int b , width ;

double x,y;

width = 5;

b = 15;

x =0.5;

y = x+ b * width;

System.out.println(y “ + ” x);

จากคำสั่งข้างต้นผลลัพธ์คือข้อใด

a)

76

b)

78

c)

75.5 + 0.5

d)

77.5 + 0.5

12.

int a,b;

double y;

b = 15;

a = 2;

y=b / a;

System.out.println( “Y = ” + b + “ / ”+ a+ “ ” +y);

จากคำสั่งข้างต้นผลลัพธ์คือข้อใด

a)

Y = 1

b)

Y = 7

c)

Y = 15/2 1

d)

Y = 15/2 7

13.

int b ,x ;

double y;

b = 15;

x = 5;

y = x + b/x ;

System.out.println(y);

a)

0

b)

4

c)

5

d)

8

14.

ข้อใดเป็นลักษณะของภาษาระดับสูง

a)

ทำงานได้โดยไม่ต้องมีโปรแกรมระบบ

b)

มีภาษาใกล้เคียงกับมนุษย์

c)

เป็นภาษาคอมพิวเตอร์ยุคใหม่

d)

เป็นภาษาที่ใช้กับงานขั้นสูง

15.

ข้อใดคือคำสงวนในภาษาจาวา

a)

num1

b)

println

c)

char_1

d)

nameConstant