ศูนย์สอบออนไลน์ (Online Quiz Center)
ศัพท์อังกฤษ (ศัพท์ยาก) - ความรู้ทั่วไป ชุดประเทศไทย - สังคมระดับมัธยมถึงปริญญา - ศัพท์อังกฤษ ระดับต้น
คอมพิวเตอร์เบื้องต้น - นักวิทยุสมัครเล่น - จังหวัด รหัสไปรษณีย์ - Visual Basic - JAVA - ศัพท์200 - ทั่วไป.ศิริรุ่ง
แบบทดสอบ จาวา ชุดเล็ก (Mini JAVA) ในชุด 30 ข้อ
ปรับปรุง : 2553-11-25 (ปรับการแสดงผล)
1. Which of the following are illegal lines? [j0005]
int x = 1;
byte b = 127;
float a = 1.1;
boolean x = true;
ผิดทุกตัวเลือก

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

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

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

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

6. Which of the following are equal 12? [j0090]
11 >> 2
11 << 2
25 >> 1
25 << 1
ผิดทุกตัวเลือก

7. Which of the following are illegal lines about String class? [j0107]
x.charAt(5)
x.concat("a")
x.length()
x.Replace("a","A")
ผิดทุกตัวเลือก

8. Which of the following are default method of runnable? [j0124]
begin()
run()
open()
start()
ผิดทุกตัวเลือก

9. Which of the following are illegal lines? [j0015]
char a = '&';
char a = 0;
char a = 09;
char a = 99;
ผิดทุกตัวเลือก

10. What will be printed out for the following code?
System.out.println(010);
[j0032]
8
10
Compilation fails
An exception is thrown at runtime
ผิดทุกตัวเลือก

11. Which of the following are Java keywords? [j0049]
standard
jsp
while
loop
ผิดทุกตัวเลือก

12. What is collection class? [j0066]
Vector
SortedSet
OrderedList
KeyMap
ผิดทุกตัวเลือก

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

14. Which of the following are false? [j0100]
'false' == 'false'
55.0 == 55L
10 != 10.1
true == false
ผิดทุกตัวเลือก

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

16. Which of the following are illegal lines? [j0008]
int x = 01;
byte b = -255;
boolean x = true;
float a = 2.1f;
ผิดทุกตัวเลือก

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

18. Which of the following are Java keywords? [j0042]
goto
Byte
Class
method
ผิดทุกตัวเลือก

19. What is collection class? [j0059]
TreeList
LinkedHashMap
MapSet
SortedSet
ผิดทุกตัวเลือก

20. Which of the following are illegal lines? [j0076]
int a = 1;
int a[] = {"1"};
int a[] = {1,2,3};
int a[] = {1};
ผิดทุกตัวเลือก

21. Which of the following are data type for switch? [j0093]
double
float
String
char
ผิดทุกตัวเลือก

22. Which of the following are illegal lines about String class? [j0110]
x.substring(5,2)
x.concat
x.length()
x.replace("a","A")
ผิดทุกตัวเลือก

23. Which of the following are illegal lines? [j0001]
int x = -991;
byte b = -127;
float a = 5;
boolean x = 1;
ผิดทุกตัวเลือก

24. Which of the following are illegal identifiers? [j0018]
yonok
joy
$aa
2005year
ผิดทุกตัวเลือก

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

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

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

28. Which of the following are legal lines for instance variables? [j0086]
can be marked final
can be marked transient
can be marked public
can be marked strictfp
ผิดทุกตัวเลือก

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

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