ศูนย์สอบออนไลน์ (Online Quiz Center)
ศัพท์อังกฤษ (ศัพท์ยาก) - ความรู้ทั่วไป ชุดประเทศไทย - สังคมระดับมัธยมถึงปริญญา - ศัพท์อังกฤษ ระดับต้น
คอมพิวเตอร์เบื้องต้น - นักวิทยุสมัครเล่น - จังหวัด รหัสไปรษณีย์ - Visual Basic - JAVA - ศัพท์200 - ทั่วไป.ศิริรุ่ง
แบบทดสอบ จาวา ชุดเล็ก (Mini JAVA) ในชุด 30 ข้อ
ปรับปรุง : 2553-11-25 (ปรับการแสดงผล)
1. Which of the following are illegal lines about String class? [j0113]
x.substring(5,2)
x.toString()
x.length("abc")
x.replace("a","A")
ผิดทุกตัวเลือก

2. Which of the following are illegal lines? [j0003]
int x = 1;
byte b = 128;
float a = 5;
boolean x = true;
ผิดทุกตัวเลือก

3. Which of the following are legal identifiers? [j0019]
_tom
-dang
123
?abc
ผิดทุกตัวเลือก

4. What will be printed out for the following code?
System.out.println(0022);
[j0035]
2
2200
18
78
ผิดทุกตัวเลือก

5. What is access modifier? [j0051]
import
private
try
javac
ผิดทุกตัวเลือก

6. What is collection class? [j0067]
TreeList
HashSet
ThreeSet
MapSet
ผิดทุกตัวเลือก

7. Which of the following are illegal lines? [j0083]
final class a{ }
class a{ }
public class a{ }
import class a{ }
ผิดทุกตัวเลือก

8. Which of the following are false? [j0099]
9 != 6
15.0 == 015
9 != 6
'yes' == 'yes'
ผิดทุกตัวเลือก

9. Which of the following are legal lines about StringBuffer class? [j0115]
x.substring(5,2)
x.toUpperCase()
x.length()
x.insert(4,"a")
ผิดทุกตัวเลือก

10. Which of the following are illegal lines? [j0005]
int x = 1;
byte b = 127;
float a = 1.1;
boolean x = true;
ผิดทุกตัวเลือก

11. Which of the following are illegal identifiers? [j0021]
123a
a123
method
index
ผิดทุกตัวเลือก

12. What will be printed out for the following code?
System.out.println(0x0011);
[j0037]
1
11
16
17
ผิดทุกตัวเลือก

13. What is access modifier? [j0053]
exception
import
javac
private
ผิดทุกตัวเลือก

14. What collection class is sorted? [j0069]
TreeList
HashTable
TreeSet
HashMap
ผิดทุกตัวเลือก

15. Which of the following are legal lines? [j0085]
System.Out.println();
System.out.println();
System.out.Println();
System.Out.Println();
ผิดทุกตัวเลือก

16. Which of the following are result of 3 & 5? [j0101]
1
3
6
7
ผิดทุกตัวเลือก

17. Which of the following are legal lines about StringBuffer class? [j0117]
x.substring(5,2)
x.toUpperCase()
x.reverse()
x.replace("a","A","")
ผิดทุกตัวเลือก

18. Which of the following are illegal lines? [j0007]
int x = 1;
byte b = 127;
boolean x = 0;
float a = 2.1f;
ผิดทุกตัวเลือก

19. How much is SHORT for primitive type? [j0023]
8 bit
16 bit
32 bit
64 bit
ผิดทุกตัวเลือก

20. What will be printed out for the following code?
System.out.println(0x022);
[j0039]
22
18
34
Compilation fails
ผิดทุกตัวเลือก

21. What is access modifier? [j0055]
java
public
void
import
ผิดทุกตัวเลือก

22. What collection class is ordered by index? [j0071]
MapSet
Vector
HashMap
HashTable
ผิดทุกตัวเลือก

23. Which of the following are illegal lines? [j0087]
void method () { }
void excite (int a) { }
int outpro () { }
void byebye (integer a) { }
ผิดทุกตัวเลือก

24. Which of the following are result of 3 ^ 5? [j0103]
1
3
6
7
ผิดทุกตัวเลือก

25. Which of the following are result of Math.ceil(8.4)? [j0119]
8
8.5
9
10
ผิดทุกตัวเลือก

26. Which of the following are illegal lines? [j0009]
byte b = 127;
int x = 0.1;
float a = 5;
boolean x = true;
ผิดทุกตัวเลือก

27. How much is LONG for primitive type? [j0025]
8 bit
16 bit
32 bit
64 bit
ผิดทุกตัวเลือก

28. Which of the following are Java keywords? [j0041]
jvm
native
Goto
integer
ผิดทุกตัวเลือก

29. What is access modifier? [j0057]
args
protected
class
void
ผิดทุกตัวเลือก

30. Which of the following are illegal lines? [j0073]
int [] a;
int [] a [];
int [][] a;
int a[5];
ผิดทุกตัวเลือก