Tìm kiếm:
TRANG NHÀ
Giới thiệu VNEDU.ORG
Điều khoản và bản quyền
Liên lạc VNEDU
TRẮC NGHIỆM TRỰC TUYẾN
---Công Cụ:---
Soạn Biểu thức
Bảng màu HTML
Ký hiệu đặc biệt 01
Ký hiệu đặc biệt 02
Ký hiệu đặc biệt 03
Ký hiệu đặc biệt 04
Ký hiệu đặc biệt 05
Ký hiệu đặc biệt 06
Ký hiệu đặc biệt 07
Ký hiệu đặc biệt [Toán]
Tin Học   ||  Căn Bản    Văn Phòng    Hệ Thống - Mạng    Phần Mềm Ứng Dụng    Kỹ thuật số    Lập trình    SQL  

Trắc Nghiệm Java - Bài 22
Ngày làm bài: Hôm nay lúc 11:57:06 (Server time)
Số câu hỏi: 10.   Tổng điểm: 10
Yêu cầu hoàn thành: 60 phút.
Thời gian còn lại: 
Cỡ chữ câu hỏi:  Cỡ chữ đáp án:


1-
Which collection class allows you to access its elements by associating a key with an element's value, and provides synchronization?
  A - 
java.util.SortedMap
  B - 
java.util.TreeMap
  C - 
java.util.TreeSet
  D - 
java.util.Hashtable
2-
Which is valid declaration of a float?
  A - 
float f = 1F;
  B - 
float f = 1.0;
  C - 
float f = "1";
  D - 
float f = 1.0d;
3-
/* Missing Statement ? */
public class foo 
{
    public static void main(String[]args)throws Exception 
    {
        java.io.PrintWriter out = new java.io.PrintWriter(); 
        new java.io.OutputStreamWriter(System.out,true); 
        out.println("Hello"); 
    } 
}
What line of code should replace the missing statement to make this program compile?
  A - 
No statement required.
  B - 
import java.io.*;
  C - 
include java.io.*;
  D - 
import java.io.PrintWriter;
4-
What is the numerical range of char?
  A - 
0 to 32767
  B - 
0 to 65535
  C - 
-256 to 255
  D - 
-32768 to 32767
5-
Which of the following are Java reserved words?
  1. run
  2. import
  3. default
  4. implement
  A - 
1 and 2
  B - 
2 and 3
  C - 
3 and 4
  D - 
2 and 4
6-
What will be the output of the program?
public class Test 
{ 
    private static float[] f = new float[2]; 
    public static void main (String[] args) 
    {
        System.out.println("f[0] = " + f[0]); 
    } 
}

  A - 
f[0] = 0
  B - 
f[0] = 0.0
  C - 
Compile Error
  D - 
Runtime Exception
7-
What will be the output of the program?
import java.util.*; 
class H 
{
    public static void main (String[] args) 
    { 
        Object x = new Vector().elements(); 
        System.out.print((x instanceof Enumeration)+","); 
        System.out.print((x instanceof Iterator)+","); 
        System.out.print(x instanceof ListIterator); 
    } 
}

  A - 
Prints: false,false,false
  B - 
Prints: false,false,true
  C - 
Prints: false,true,false
  D - 
Prints: true,false,false
8-
What will be the output of the program?
TreeSet map = new TreeSet();
map.add("one");
map.add("two");
map.add("three");
map.add("four");
map.add("one");
Iterator it = map.iterator();
while (it.hasNext() ) 
{
    System.out.print( it.next() + " " );
}

  A - 
one two three four
  B - 
four three two one
  C - 
four one three two
  D - 
one two three four one
9-
What will be the output of the program?
public static void main(String[] args) 
{
    Object obj = new Object() 
    {
        public int hashCode() 
        {
            return 42;
        }
    }; 
    System.out.println(obj.hashCode()); 
}

  A - 
42
  B - 
Runtime Exception
  C - 
Compile Error at line 2
  D - 
Compile Error at line 5
10-
class Test1 
{
    public int value;
    public int hashCode() { return 42; }
}
class Test2 
{
    public int value;
    public int hashcode() { return (int)(value^5); }
}
which statement is true?
  A - 
class Test1 will not compile.
  B - 
The Test1 hashCode() method is more efficient than the Test2 hashCode() method.
  C - 
The Test1 hashCode() method is less efficient than the Test2 hashCode() method.
  D - 
class Test2 will not compile.
 
[Người đăng: Thành Lãm - ST]
Ghé thăm Kênh của Vị Sư "hai lần chết đi sống lại"
Tu Si Chau Soc Thon

https://www.youtube.com/channel/UCoyC9WTTVR-M3qpTKKEXGnQ

Chau Soc Thon Official Channel


Phong Bảo Official
Phong Bao Official
Xem Nhiều nhất
Trắc Nghiệm Pascal - Bài 20
Trắc Nghiệm ASP.NET - Bài 12
Trắc Nghiệm Ngôn Ngữ Lập Trình C - Bài 16
Trắc Nghiệm ASP.NET - Bài 01
Trắc Nghiệm ASP.NET - Bài 03
Trắc nghiệm C++ - Bài 18
Trắc Nghiệm C# - Bài 53
Trắc Nghiệm ASP.NET - Bài 02
Trắc Nghiệm C# - Bài 42
Trắc Nghiệm Java - Bài 01
Trắc Nghiệm ASP.NET - Bài 04
Trắc Nghiệm Pascal - Bài 22
Trắc Nghiệm ASP.NET - Bài 13
Trắc Nghiệm ASP.NET - Bài 09
Trắc Nghiệm ASP.NET - Bài 08
Trắc nghiệm PHP - Bài 01
Trắc Nghiệm ASP.NET - Bài 06
Trắc Nghiệm ASP.NET - Bài 11
Trắc Nghiệm ASP.NET - Bài 05
Trắc Nghiệm ASP.NET - Bài 23
Đề Xuất
Trắc nghiệm C++ - Bài 10
Trắc Nghiệm Thiết Kế Web Và Flash - Bài 04
Trắc Nghiệm Ngôn Ngữ Lập Trình C - Bài 16
Trắc Nghiệm Visual Basic - Bài 27
Trắc Nghiệm ASP.NET - Bài 09
Trắc nghiệm Linux ( English ) - Bài 21
Trắc Nghiệm C++ - Bài 07
Trắc Nghiệm Thiết Kế Web (English) - Bài 28
Trắc Nghiệm ASP.NET (English) - Bài 20
Trắc Nghiệm Pascal - Bài 32
Trắc nghiệm Ngôn Ngữ Lập Trình C++ - Bài 38
Trắc Nghiệm ASP.NET - Bài 23
Trắc Nghiệm Visual Basic - Bài 25
Trắc Nghiệm ASP.NET (English) - Bài 28
Trắc Nghiệm Java - Bài 35
Trắc Nghiệm Thiết Kế Web - Bài 05
Trắc Nghiệm C Sharp - Bài 25
Trắc Nghiệm Thiết Kế Web (English) - Bài 23
Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 18
Trắc Nghiệm Pascal - Bài 17
Phát triển hệ thống: TRƯƠNG HỮU ĐỨC - Phiên bản 3.0 - © Copyright 2013 - 2024 - VNEDU.ORG

free counters