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]
55 bài trong 6 trang (10 bài/trang) và bạn đang ở trang 4.
Demo

What is the name of the method used to start a thread execution? A. init(); B. start(); C. run(); D. resume();.... Which two are valid constructors for Thread? Thread(Runnable r, String name) Thread() Thread(int priority) Thread(Runnable r, ThreadGroup g) Thread(Runnable r, int priority) A. 1 and 3 B. 2 and 4 C. 1 and 2 D. 2 and 5......

Demo

Which is true about an anonymous inner class? A. It can extend exactly one class and implement exactly one interface. B. It can extend exactly one class and can implement multiple interfaces. C. It can extend exactly one class or implement exactly one interface. D. It can implement multiple interfaces regardless of whether it also extends a class...... which one create an anonymous inner class from within class Bar? A. Boo f = new Boo(24) { }; B. Boo f = new Bar() { }; C. Bar f = new Boo(String s) { }; D. Boo f = new Boo.Bar(String s) { };.......

Demo

Which statement is true for the class java.util.HashSet? A. The elements in the collection are ordered. B. The collection is guaranteed to be immutable. C. The elements in the collection are guaranteed to be unique. D. The elements in the collection are accessed using a unique key....... Which of the following statements about the hashcode() method are incorrect? The value returned by hashcode() is used in some collection classes to help locate objects. The hashcode() method is required to return a positive int value. The hashcode() method in the String class is the one inherited from Object. .....

Demo

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........ 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........

Demo

Which collection class allows you to grow or shrink its size and provides indexed access to its elements, but whose methods are not synchronized? A. java.util.HashSet B. java.util.LinkedHashSet C. java.util.List D. java.util.ArrayList......... You need to store elements in a collection that guarantees that no duplicates are stored and all elements can be accessed in natural order. Which interface provides that capability? A. java.util.Map B. java.util.Set C. java.util.List D. java.util.Collection.......

Demo

What will be the output of the program? class Exc0 extends Exception { } class Exc1 extends Exc0 { } /* Line 2 */ public class Test { public static void main(String args[]) { try { throw new Exc1(); /* Line 9 */ } catch (Exc0 e0) /* Line 11 */ { System.out.println("Ex0 caught"); } catch (Exception e) { System.out.println("exception caught"); } } } A. Ex0 caught B. exception caught C. Compilation fails because of an error at line 2. D. Compilation fails because of an error at line 9......

Demo

What will be the output of the program? int I = 0; label: if (I < 2) { System.out.print("I is " + I); I++; continue label; } A. I is 0 B. I is 0 I is 1 C. Compilation fails. D. None of the above...... What will be the output of the program? public class Foo { public static void main(String[] args) { try { return; } finally { System.out.println( "Finally" ); } } } A. Finally B. Compilation fails. C. The code runs with no output. D. An exception is thrown at runtime........

Demo

What will be the output of the program? for (int i = 0; i < 4; i += 2) { System.out.print(i + " "); } System.out.println(i); /* Line 5 */ A. 0 2 4 B. 0 2 4 5 C. 0 1 2 3 4 D. Compilation fails........ What will be the output of the program? int x = 3; int y = 1; if (x = y) /* Line 3 */ { System.out.println("x =" + x); } A. x = 1 B. x = 3 C. Compilation fails. D. The code runs with no output.......

Demo

What will be the output of the program? int i = l, j = -1; switch (i) { case 0, 1: j = 1; /* Line 4 */ case 2: j = 2; default: j = 0; } System.out.println("j = " + j); A. j = -1 B. j = 0 C. j = 1 D. Compilation fails....... What will be the output of the program? int i = 1, j = 10; do { if(i > j) { break; } j--; } while (++i < 5); System.out.println("i = " + i + " and j = " + j); .....

Demo

import java.awt.*; class Ticker extends Component { public static void main (String [] args) { Ticker t = new Ticker(); /* Missing Statements ? */ } } which two of the following statements, inserted independently, could legally be inserted into missing section of this code? boolean test = (Component instanceof t); boolean test = (t instanceof Ticker); boolean test = t.instanceof(Ticker); boolean test = (t instanceof Component); A. 1 and 4 B. 2 and 3 C. 1 and 3 D. 2 and 4......

    Đến trang:   Left    1    2    3    5    6    Right  
Thống kê:
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