ศูนย์สอบออนไลน์ (Online Quiz Center)
ศัพท์อังกฤษ (ศัพท์ยาก) - ความรู้ทั่วไป ชุดประเทศไทย - สังคมระดับมัธยมถึงปริญญา - ศัพท์อังกฤษ ระดับต้น
คอมพิวเตอร์เบื้องต้น - นักวิทยุสมัครเล่น - จังหวัด รหัสไปรษณีย์ - Visual Basic - JAVA - ศัพท์200 - ทั่วไป.ศิริรุ่ง
แบบทดสอบ จาวา ชุดเล็ก (Mini JAVA) ในชุด 30 ข้อ
ปรับปรุง : 2553-11-25 (ปรับการแสดงผล)
1. 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
ผิดทุกตัวเลือก

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

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

4. Which of the following are default method of default constructor? [j0125]
super()
run()
this()
start()
ผิดทุกตัวเลือก

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

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

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

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

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

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

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

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

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

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

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

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

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

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

19. What collection class is sorted? [j0068]
TreeList
TreeMap
MapSet
HashTable
ผิดทุกตัวเลือก

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

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

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

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

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

25. Which of the following are legal identifiers? [j0020]
joy
-dang
33
class
ผิดทุกตัวเลือก

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

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

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

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

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