ศูนย์สอบออนไลน์ (Online Quiz Center)
ศัพท์อังกฤษ (ศัพท์ยาก) - ความรู้ทั่วไป ชุดประเทศไทย - สังคมระดับมัธยมถึงปริญญา - ศัพท์อังกฤษ ระดับต้น
คอมพิวเตอร์เบื้องต้น - นักวิทยุสมัครเล่น - จังหวัด รหัสไปรษณีย์ - Visual Basic - JAVA - ศัพท์200 - ทั่วไป.ศิริรุ่ง
แบบทดสอบ จาวา ชุดเล็ก (Mini JAVA) ในชุด 30 ข้อ
ปรับปรุง : 2553-11-25 (ปรับการแสดงผล)
1. What will be printed out for the following code?
System.out.println('True');
[j0030]
true
TRUE
Compilation fails
An exception is thrown at runtime
ผิดทุกตัวเลือก

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

3. What collection class is ordered by index? [j0070]
ArrayList
HashTable
HashMap
SortedSet
ผิดทุกตัวเลือก

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

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

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

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

8. Which of the following are Java keywords? [j0044]
and
difference
header
volatile
ผิดทุกตัวเลือก

9. What is collection class? [j0064]
MapSet
KeyMap
LinkedHashSet
ThreeSet
ผิดทุกตัวเลือก

10. Which of the following are illegal lines? [j0084]
final class a{ }
interface class a{ }
public class a{ }
abstract Class a{ }
ผิดทุกตัวเลือก

11. Which of the following are result of 4 & 6? [j0104]
1
2
4
6
ผิดทุกตัวเลือก

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

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

14. What will be printed out for the following code?
System.out.println(0x11);
[j0038]
0
11
17
Compilation fails
ผิดทุกตัวเลือก

15. What is collection class? [j0058]
ArrayList
LinkList
ThreeSet
MapSet
ผิดทุกตัวเลือก

16. Which of the following are illegal lines? [j0078]
integer a = 1;
double a = 1;
long a = 1;
float a = 1;
ผิดทุกตัวเลือก

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

18. Which of the following are result of Math.abs(99)? [j0118]
0
9
99
-99
ผิดทุกตัวเลือก

19. Which of the following are illegal lines? [j0012]
char a = 'a' + 'a';
byte a = 'z' + 'z'
int a = 10/3;
byte a = 10/3;
ผิดทุกตัวเลือก

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

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

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

23. Which of the following are equal 3? [j0092]
13 >> 2
13 << 2
27 >> 1
27 << 1
ผิดทุกตัวเลือก

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

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

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

27. Which of the following are Java keywords? [j0046]
exception
Import
package
export
ผิดทุกตัวเลือก

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

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

30. Which of the following are result of 4 & 6? [j0106]
1
2
4
6
ผิดทุกตัวเลือก