Java Objective Questions Answers -Chapter 1 Online Quiz Test
-
1. Which class cannot be subclassed (or extended) in java?
- abstract class
- parent class
- Final class
- None of above
-
2. Can we declare abstract static method
- Yes
- No
-
3. Can we access private class outside the package
- Yes
- No
-
4. Why we use array as a parameter of main method
- it is syntax
- Can store multiple values
- Both of above
- None of above
-
5. Suspend thread can be revived by using
- start() method
- Suspend() method
- resume() method
- yield() method
-
6. Runnable is
- Class
- Method
- Variable
- Interface
-
7. Which collection class associates values witch keys, and orders the keys according to their natural order
- java.util.HashSet
- java.util.LinkedList
- java.util.TreeMap
- java.util.SortedSet
-
8. Which method is used to perform DML statements in
JDBC- execute()
- executeUpdate()
- executeQuery()
- None of above
-
9. Which of the following below are valid isolation levels in J2EE
- TRANSACTION_READ_UNCOMMITTED
- TRANSACTION_SERIALIZABLE
- Only A
- Both A and B
-
10. Session beans are created by the client submitting the query to the database
- True
- False
-
11. Which metrhods are utilized to control the access to an object in multi threaded programming
- Asynchronized methods
- Synchronized methods
- Serialized methods
- None of above
-
12. In Runnable, many threads share the same object instance
- True
- False
-
13. Java beans have no types
- True
- False
-
14. Program which executes applet is known as
- applet engine
- virtual machine
- JVM
- None of above
-
15. Which statement is static and synchronized in JDBC API
- executeQuery()
- executeUpdate()
- getConnection()
- prepareCall()
-
16. The JDBC-ODBC bridge is
- Multithreaded
- Singlethreaded
- Both of above
- None of above
-
17. All raw data types should be read and uploaded to the database as an array of
- int
- char
- bollean
- byte
-
18. The class java.sql.Timestamp is associated with
- java.util.Time
- java.sql.Time
- java.util.Date
- None of above
-
19. Which of the following statements about arrays is syntactically wrong
- arrayName[] p = new arrayName[5];
- arrayName p[5];
- arrayName[] p [];
- arrayName p[][] = new arrayName[2][];
-
20. The Externizable interface extends the serializable interface
- True
- False