Java Question Bank Objective Q&A

If readers want to add something or explain the answers please send us mail at info@ingenuitydias.com mentioning Question number.If you think some answers are not suitable please lets know.We will do our best to enhance content quality on our Blog.
C Question Bank
Embedded C Question Bank
Embedded Systems for Engineering freshers Basics Guide
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. pow () is associated with which class
- Math class
- Input stream class
- Object class
- None of above
4. Program which executes applet is known as
- applet engine
- virtual machine
- JVM
- None of above
- 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 statements about arrays is syntactically wrong
- arrayName[] p = new arrayName[5];
- arrayName p[5];
- arrayName[] p [];
- arrayName p[][] = new arrayName[2][];
10. Session beans are created by the client submitting the query to the database
- True
- False
11. Which methods are utilised to control the access to an object in multi threaded programming
- ASynchronised methods
- Synchronised methods
- Serialised 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. Why we use array as a parameter of main method
- it is syntax
- Can store multiple values
- Both of above
- None of above
15. Which statement is static and synchronised in JDBC API
- executeQuery()
- executeUpdate()
- getConnection()
- prepareCall()
16. The JDBC-ODBC bridge is
- Multi-threaded
- Single-threaded
- 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
- Boolean
- 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 below are valid isolation levels in J2EE
- TRANSACTION_READ_UNCOMMITTED
- TRANSACTION_SERIALIZABLE
- Only A
- Both A and B
20. The Externalise interface extends the serialise interface
- True
- False
21. Converting a primitive type data into its corresponding wrapper class object instance is called
- boxing
- wrapping
- instantiation
- autoboxing
22. Package of drawstring() method is
- java.applet
- java.io
- javax.swing
- java.awt
23. Which method executes only once
- start() method
- init() method
- stop() method
- destroy() method
24. Object which can store group of other objects is called
- Collection object
- Java object
- Package
- Wrapper
25. All collection classes are available in
- java.io package
- java.lang package
- java.awt package
- java.util package
26. Thread class is available in
- java.io package
- java.lang package
- java.awt package
- java.util package
27. Minimum threads in a program are
- 1
- 2
- 5
- Many
28. JIT meaning
- java in time
- just in time
- join in time
- none of above
29. After the compilation of the java source code, which file is created by the JVM
- .class
- .java
- .cdr
- .doc
30. Can we access private class outside the package
- Yes
- No
31. Constructor has return type
- True
- False
32. x=x+1 is equivalent to
- ++x
- x++
- x=x-1
- None of these
33. If method have same name as class name and method don’t have any return type then it is known as
- Destructors
- Object
- Variable
- Constructor
34. Methods that have same name, but different Parameter list and different definition known as
- Overriding
- Constructor
- Overloading
- none of these
35. Inheritance means
- Sub class extends super class
- Sub class extends Base class
- Sub class create object of super class
- All of the above
36. Which type of inheritance is not supported by java
- Single
- Multiple
- Multilevel
- Hierarchical
37. String is the predefined
- Method
- Class
- Variable
- Object
38. Super is the predefined
- Keyword
- Method
- Keyword and Method
- None of above
39. Execution of the program is always begins with
- Main method
- class contain main method
- parent class
- default package
40. All methods of interface are public and abstract
- True
- False