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

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

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

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

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

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

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

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

9. What is collection class? [j0062]
LinkedList
OrderedList
KeyMap
KeySet
ผิดทุกตัวเลือก

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

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

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

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

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

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

16. Which of the following are false? [j0097]
7 != 6
5.0 == 5L
true == false
'a' == 'a'
ผิดทุกตัวเลือก

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

18. Which of the following are ilegal identifiers? [j0017]
abc
class
method
var
ผิดทุกตัวเลือก

19. Which of the following are Java keywords? [j0040]
java
mail
extend
const
ผิดทุกตัวเลือก

20. What is collection class? [j0063]
ThreeSet
HashTable
TreeList
SortedSet
ผิดทุกตัวเลือก

21. 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
ผิดทุกตัวเลือก

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

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

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

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

26. Which of the following are illegal lines? [j0075]
int [] ok;
int [] bye [];
int [][] case;
int test[];
ผิดทุกตัวเลือก

27. Which of the following are false? [j0098]
8 != 6
true == false
5.0 == 5L
'a' == 'a'
ผิดทุกตัวเลือก

28. Which of the following are in Object class? [j0121]
wait()
sleep()
run()
yield()
ผิดทุกตัวเลือก

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

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