All_CoreJava_QB - FPT University Question Paper Source:...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
FPT University Question Paper Source: Export from FU-OES Subject: JAD Test Code: Number of Question: 268 Total mark:257 Generated Time: 6/4/2010 6:31:15 PM QN=1 (300) ______ is a set of java API for executing SQL statements. a. ODBC b. JDBC c. JAVADB d. None of the others e. f. ANS: B MARK: 0.5 CHAPTER: MIX CHOICES: No QN=2 (311) ______ method is used to wait for a client to initiate communications. a. wait() b. accept() c. listen() d. e. f. ANS: B MARK: 0.5 CHAPTER: MIX CHOICES: Yes QN=3 (7259) ___________ drivers that are written partly in the Java programming language and partly in native code. These drivers use a native client library specific to the data source to which they connect. Again, because of the native code, their portability is limited. a. Type 2 b. Type 3
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
c. Type 1 d. Type 4 e. f. ANS: A MARK: 0.5 CHAPTER: MIX CHOICES: Yes QN=4 (7261) ____________ drivers that are pure Java and implement the network protocol for a specific data source. The client connects directly to the data source. a. Type 4 b. Type 3 c. Type 2 d. Type 1 e. f. ANS: A MARK: 0.5 CHAPTER: MIX CHOICES: Yes QN=5 (7260) ____________ drivers that use a pure Java client and communicate with a middleware server using a database-independent protocol. The middleware server then communicates the client's requests to the data source. a. Type 3 b. Type 2 c. Type 1 d. Type 4 e. f. ANS: A MARK: 0.5 CHAPTER: MIX CHOICES: Yes QN=6 (7258) ______________ drivers that implement the JDBC API as a mapping to another data access API, such as ODBC. Drivers of this type are generally
Background image of page 2
dependent on a native library, which limits their portability. a. Type 1 b. Type 2 c. Type 3 d. Type 4 e. f. ANS: A MARK: 0.5 CHAPTER: MIX CHOICES: Yes QN=7 (1513) 1. public class A { 2. public String doit(int x, int y) { 3. return “a”; 4. } 5. 6. public String doit(int. .. vals) { 7. return “b”; 8. } 9. } Given: 25. A a=new A(); 26. System.out.println(a.doit(4, 5)); What is the result? (Choose one.) a. Line 26 prints “a” to System.out. b. Line 26 prints “b” to System.out. c. An exception is thrown at line 26 at runtime. d. Compilation of class A will fail due to an error in line 6. e. f. ANS: A MARK: 1 CHAPTER: MIX CHOICES: Yes QN=8 (1525) 1. public class A { 2. public void method1() { 3. B b=new B(); 4. b.method2();
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5. // more code here 6. } 7.} 1. public class B { 2. public void method2() { 3. C c=new C(); 4. c.method3(); 5. // more code here 6. } 7.} 1. public class C { 2. public void method3() { 3. // more code here 4. } 5.} 25. try { 26. A a=new A(); 27. a.method1(); 28. }catch (Exception e) { 29. System.out.print(”an error occurred”); 30. } Which two are true if a NullPointerException is thrown on line 3 of class C? (Choose two.) a. The application will crash. b.
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/03/2011 for the course INFORMATIO 12 taught by Professor Mr.frank during the Spring '11 term at University of Sheffield.

Page1 / 120

All_CoreJava_QB - FPT University Question Paper Source:...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online