0% found this document useful (0 votes)
18 views4 pages

Advanced JAVA 2022

Uploaded by

manuelbapama
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
18 views4 pages

Advanced JAVA 2022

Uploaded by

manuelbapama
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
4 PENTECOST UNIVERSITY FACULTY OF ENGINEERING, SCIENCE AND COMPUTING FIRST SEMESTER/TRIMESTER EXAMINATIONS — AUGUST, 2022 COURSE TITLE: ADVANCED JAVA | PRIEST 7 smocaasott worn THCINOLOCY lave ae sesaa SECTION. Answer All Questions in this section on the question paper. Submit the question paper together with the answer booklet to the chief invigilator. Each Question Carry One (1) Mark. Total Marks: 20 1. Identify the package that defines the JFrame class in Java. A. javax.swing B. javaawt 2. Which class enables you to create a drop-down menu in Java? A. List B. Choice C. Label D. TabbedPane 3. Identify an intermediate-level Swing container. A. JPanel B. JFrame C. sDialog D. JComboBox 4, Which event listener receives notifications for the events generated by radio buttons? A. ItemListener B. TextListener C. AdjustmentListener D. ActionListener 5. Consider the statements ‘An event listener listens to a specific event and is notified when that specific event occurs. ‘vent listeners are the interfaces and the event-handler is a method declared in the event listener interface that is implemented by an application. Identify the correct option. ‘A. Statement jis true and statement i is false B. Statement iis false and statement iii c . Both, statements, i and i, are false. 6. The following except one are mouse events ‘A. Pressing a mouse button B. moving a mouse c D. 7. Which concept of object-oriented programming is used in method overriding? ‘A. PoijiiOrphisiil B. Abstraction C. Encapsulation ‘D. Inheritance 8. Which type of inheritance enables you to inherit class data members and methods from more than one superclass? A. Sing ance 2. Malin iaetanes Muley! inheritance D. Mulkipathinbertaner 9. Kdentfy the keyword that a subclass uses to inherit from a superclass, A. implements B. C. super D. final 10. Which concept enables you to create objects that respond to the same method as defined in the superclass? A. Inner classes B. Abstract classes C. Anonymous classes > Method gaming 11, Identify the method declared by the Runnable interface: A. stop() B_ yield Congas D. start() 2. M4 16. 17. Which is not the state ofa thread? A. Running cnet D. Ready - Sclect the interface that is used to retrieve information about databases. A. Dabasciouet B. ResultSet C._ PreparedStatement D. ResulSetMetaData Which one of the following SQL sub-languages is used to modify data in a database? A B. © TCL D. DLL ‘Which one of the following JDBC drivers provides direct access to the database? A. Native-APL-Partly-Java dri B. Nate Poel Puce ver c. ridge driver D. SDBC-Net-Pure-Java driver Which of the following is a DML command? A. CREATE B. c. D. ALTER Select the correct option that can be used to create a result set in which the cursor ean move in both the directions, A. TYRE SCROLL SENSITIVE B. R_READ_ONLY C. TYPE_FORWARD_ONLY D. CLOSE_CURSORS_AT_COMMIT ‘Which one of the following methods is used to execute INSERT, UPDATE, and DELETE. statements in a Java application? A. executelnsert() B. oo executeDelete() ‘Which interface enables you to establish a connection between a Java application and a database ? A. Statement interface B. ResultSet interface CC. DriverManager interface ‘that uses the JDBC API to interact with the 20 layer signifies a Java appli JDBC driver AL B. JDBC driver layer C. JDBC driver manager layer D. JDBC API layer SECTION B This section is made up of Six(6) questions. Answer any four (4) in the answer booklet provided. Each question carries 10 marks. Total Marks: 40 1. A, What is inheritance? (2 Marks} B. List and explain with examples the types of inheritance in Java [8 Marks} 2. A. Explain the concept of interfaces. [2 Marks} B. Explain with example how interface and inheritance are different ot similar [8 Marks} 3. A. What is a thread? [2 Marks] B. List and explain the life cycle of a thread [3 Marks} C. List and explain five (5) methods used to create and run threads [5 Marks] 4. Discuss the commonly used classes and interfaces in the JDBC API [10 Marks} 5. List the various database operations that you can perform using a Java application and discuss how they are implemented (10 Marks} 6.A. What is a transaction? [2 Marks} B. Discuss how a transaction is implemented [8 Marks} ‘Good Luck 4

You might also like