Đăng Nhập
Latest topics
de 1 java2
3 posters
Trang 1 trong tổng số 1 trang
de 1 java2
Câu 1: What will be the result of trying to compile and run the following code ?
public class MyClass {
public static void main(String[] args){
StringBuffer sb = new StringBuffer("have a nice day");
sb.setLength(6);
System.out.println(sb);
}
}
A. The program will print "have a" when run
B. The code will fail to compile since there is no method named setLength() in the StringBuffer
C. The program will print "ce day" when run
D. The program will print "have a nice day" when run
Câu 2: tries to match the input sequence against the pattern starting from beginning.
A. boolean lookingAt()
B. boolean find()
Câu 3: The annotation type is used to determine the longevity of the information.
A. @Retention
B. @Documented
C. @Deprecated
D. @Override
Câu 4: Invoke methods using refleftion.
A. getField() on class
B. NewInstance() on Constructo
C. invoke()
D. set()
Câu 5: Which will be the result of trying to compile and run the Expression : (Math.random()*4) ?
A. The probability that the number 0,1,2 or 3 might be returned is equal
B. A negative number might be returned .
C. The number 4 is returned .
D. The number 0 will be returned .
Câu 6: Which statements are true?
- 3 choices
A. Reflection API cannot manipulate classes.
B. Reflection API is used to get and set values in an array
C. Reflection API induces code into a particular set of classes during execution
D. Reflection API retrieves the object and its interface for examination
Câu 7: Which statements are true ?
- 3 choices
A. Values of arrays can be retrieved during runtime
B. Array can be identified at runtime.
C. Arrays can not be created at runtim
D. Values to elements can be assigned to arrays at runtime
Câu 8: A......…..method when invoked for an object ,acquires a….......for the object before comme . ?
A. start(),reference
B. syschronized,lock
C. run(),lock
D. notify(),reference
Câu 9: Annotations consist of names and have no value associated with it. It consist of the annotaion name and no additional data.
A. Single - Value Annotations.
B. Maker Annotations.
C. Full Annotations
Câu 10: Which methods of the Matcher class do not actually attempt to match an input sequence against a pattern ?
A. find()
B. start()
C. matches()
D. lookingAt()
Câu 11: The reflection API corresponds to classes, Interfaces and objects in JVM.
A. True
B. False
Câu 12: They are extra informations associated with particular section of a document or with the whole document.They provide information about an existing data and can be used with any web document.
A. Threads
B. Annotation
C. Regular Expression
D. Refletion
Câu 13: Annotation can not be used to which items:
A. Classes,Package
B. Interfaces,Local Variable
C. Global variables
D. Methods,Constructors
Câu 14: This tries to match the entire input sequence against the pattern.
-1 choice.
A. boolean find()
B. nt end()
C. boolean matches()
D. boolean lookingAt()
Câu 15: So as to create a pattern object, ...........method is invoked
A. compile()
B. matcher()
C. boolean matches()
D. int start()
Câu 16: Be Known as single - element, It consists of single value. It can be represented as data= value pair or value within the parenthese.
A. Maker Annotations.
B. Single - Value Annotations
C. Full Annotations.
Câu 17: The use of annotation type indicateds that the markered element should no longer be used.
A. @Deprecated
B. @Override
Câu 18: Which is the most suitable data-structure to store small amount of the data for rapid access that need not be sorted or checked for uniqueness?
A. an array
B. LinkedList
C. HashMap
D. TreeSet
Câu 19: Which of the following statements should be inserted at line 4 so that the following code will compile properly ?
Import java.util.*;
class MyClass{
public static void man(String[] args{
// line of code to be inserted here
x.add("one");
.....
.........}
}
A. HashSet x = new HashSet();
B. A.List x = new LinkedList();
C. ArrayList x = new ArrayList();
D. LinkedList x = new LinkedList();
Câu 20: Create objects using prameterized constructors
A. NewInstance() on Constructor
B. set()
C. getField() on class
D. invoke()
Câu 21: What will be the output of compiling and running the following code?
HashSet hs = new HashSet();
hs.add(“apples”);
hs.add(“oranges”);
HashSet
public class MyClass {
public static void main(String[] args){
StringBuffer sb = new StringBuffer("have a nice day");
sb.setLength(6);
System.out.println(sb);
}
}
A. The program will print "have a" when run
B. The code will fail to compile since there is no method named setLength() in the StringBuffer
C. The program will print "ce day" when run
D. The program will print "have a nice day" when run
Câu 2: tries to match the input sequence against the pattern starting from beginning.
A. boolean lookingAt()
B. boolean find()
Câu 3: The annotation type is used to determine the longevity of the information.
A. @Retention
B. @Documented
C. @Deprecated
D. @Override
Câu 4: Invoke methods using refleftion.
A. getField() on class
B. NewInstance() on Constructo
C. invoke()
D. set()
Câu 5: Which will be the result of trying to compile and run the Expression : (Math.random()*4) ?
A. The probability that the number 0,1,2 or 3 might be returned is equal
B. A negative number might be returned .
C. The number 4 is returned .
D. The number 0 will be returned .
Câu 6: Which statements are true?
- 3 choices
A. Reflection API cannot manipulate classes.
B. Reflection API is used to get and set values in an array
C. Reflection API induces code into a particular set of classes during execution
D. Reflection API retrieves the object and its interface for examination
Câu 7: Which statements are true ?
- 3 choices
A. Values of arrays can be retrieved during runtime
B. Array can be identified at runtime.
C. Arrays can not be created at runtim
D. Values to elements can be assigned to arrays at runtime
Câu 8: A......…..method when invoked for an object ,acquires a….......for the object before comme . ?
A. start(),reference
B. syschronized,lock
C. run(),lock
D. notify(),reference
Câu 9: Annotations consist of names and have no value associated with it. It consist of the annotaion name and no additional data.
A. Single - Value Annotations.
B. Maker Annotations.
C. Full Annotations
Câu 10: Which methods of the Matcher class do not actually attempt to match an input sequence against a pattern ?
A. find()
B. start()
C. matches()
D. lookingAt()
Câu 11: The reflection API corresponds to classes, Interfaces and objects in JVM.
A. True
B. False
Câu 12: They are extra informations associated with particular section of a document or with the whole document.They provide information about an existing data and can be used with any web document.
A. Threads
B. Annotation
C. Regular Expression
D. Refletion
Câu 13: Annotation can not be used to which items:
A. Classes,Package
B. Interfaces,Local Variable
C. Global variables
D. Methods,Constructors
Câu 14: This tries to match the entire input sequence against the pattern.
-1 choice.
A. boolean find()
B. nt end()
C. boolean matches()
D. boolean lookingAt()
Câu 15: So as to create a pattern object, ...........method is invoked
A. compile()
B. matcher()
C. boolean matches()
D. int start()
Câu 16: Be Known as single - element, It consists of single value. It can be represented as data= value pair or value within the parenthese.
A. Maker Annotations.
B. Single - Value Annotations
C. Full Annotations.
Câu 17: The use of annotation type indicateds that the markered element should no longer be used.
A. @Deprecated
B. @Override
Câu 18: Which is the most suitable data-structure to store small amount of the data for rapid access that need not be sorted or checked for uniqueness?
A. an array
B. LinkedList
C. HashMap
D. TreeSet
Câu 19: Which of the following statements should be inserted at line 4 so that the following code will compile properly ?
Import java.util.*;
class MyClass{
public static void man(String[] args{
// line of code to be inserted here
x.add("one");
.....
.........}
}
A. HashSet
B. A.List
C. ArrayList
D. LinkedList
Câu 20: Create objects using prameterized constructors
A. NewInstance() on Constructor
B. set()
C. getField() on class
D. invoke()
Câu 21: What will be the output of compiling and running the following code?
HashSet
hs.add(“apples”);
hs.add(“oranges”);
HashSet
loptruong- Khỉ Trưởng Lão
- Tổng số bài gửi : 19
Join date : 23/09/2010
Re: de 1 java2
pak" , cho e hỏi cái đề này có đúng k zi . Đề thi 26 câu sao có 50 câu lun =,=" . nghi quá , e sắp thi môn này , thấy màu ghia quá >"< . Help me !!!!
pe lun- Khỉ Trưởng Lão
- Tổng số bài gửi : 15
Join date : 28/10/2010
Age : 32
Đến từ : Gia Lai
Trang 1 trong tổng số 1 trang
Permissions in this forum:
Bạn không có quyền trả lời bài viết
|
|
Mon Dec 02, 2013 6:22 pm by hoangthai0302
» [Tham khảo] Đề thi BDW FPT
Wed Aug 14, 2013 8:08 pm by yowisu
» Nhận giúp làm đồ án, project cuối kỳ, bài tập lớn cho sinh viên học lập trình dotNet tại Hà Nội
Mon Jul 08, 2013 11:44 am by aiglevnpro
» Đây là tài liệu học RDBMS mời download
Fri Nov 09, 2012 9:51 am by laiconghung
» [Tham Khảo] Ass 4 của tui :)
Fri Oct 26, 2012 10:21 pm by dat21892
» Giới thiệu Đại học FPT-Greenwich
Thu Oct 11, 2012 2:02 pm by comnhom.it
» De Ly Thuyet 134 cau day. Chuan luon do cua aptech nha
Tue Jun 26, 2012 10:33 pm by PhucBach
» THÔNG BÁO CƠ HỘI NGHỀ NGHIỆP
Tue Jun 05, 2012 10:48 am by yenns
» Khóa học miễn phí thiết kế diễn đàn bằng Vbulletin tại ICODE
Tue May 01, 2012 12:15 pm by mr_icode