Java Question Bank Objective Q&A

Java Question Bank Objective Q&A IngenuityDias
Here we have collected frequently asked question in job interviews.We have chosen Java as our readers choice.You will find these helpful.We encourage our Readers to send in their suggestion.

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?
  1. abstract class
  2. parent class
  3. Final class
  4. None of above
Answer: 3

2. Can we declare abstract static method
  1. Yes
  2. No
Answer: 2

3. pow () is associated with which class
  1. Math class
  2. Input stream class
  3. Object class
  4. None of above
Answer: 1

4. Program which executes applet is known as
  1. applet engine
  2. virtual machine
  3. JVM
  4. None of above
Answer: 1

5. Suspend thread can be revived by using
  1. start() method
  2. Suspend() method
  3. resume() method
  4. yield() method
Answer: 3

6. Runnable is
  1. Class
  2. Method
  3. Variable
  4. Interface
Answer: 4

7. Which collection class associates values witch keys, and orders the keys according to their natural order
  1. java.util.HashSet
  2. java.util.LinkedList
  3. java.util.TreeMap
  4. java.util.SortedSet
Answer: 3

8. Which method is used to perform DML statements in JDBC
  1. execute()
  2. executeUpdate()
  3. executeQuery()
  4. None of above
Answer: 2

9. Which of the following statements about arrays is syntactically wrong
  1. arrayName[] p = new arrayName[5];
  2. arrayName p[5];
  3. arrayName[] p [];
  4. arrayName p[][] = new arrayName[2][];
Answer: 2

10. Session beans are created by the client submitting the query to the database
  1. True
  2. False
Answer: 1


11. Which methods are utilised to control the access to an object in multi threaded programming
  1. ASynchronised methods
  2. Synchronised methods
  3. Serialised methods
  4. None of above
Answer: 2

12. In Runnable, many threads share the same object instance
  1. True
  2. False
Answer: 1

13. Java beans have no types
  1. True
  2. False
Answer: 1

14. Why we use array as a parameter of main method
  1. it is syntax
  2. Can store multiple values
  3. Both of above
  4. None of above
Answer: 2

15. Which statement is static and synchronised in JDBC API
  1. executeQuery()
  2. executeUpdate()
  3. getConnection()
  4. prepareCall()
Answer: 3

16. The JDBC-ODBC bridge is
  1. Multi-threaded
  2. Single-threaded
  3. Both of above
  4. None of above
Answer: 1

17. All raw data types should be read and uploaded to the database as an array of
  1. int
  2. char
  3. Boolean
  4. byte
Answer: 4

18. The class java.sql.Timestamp is associated with
  1. java.util.Time
  2. java.sql.Time
  3. java.util.Date
  4. None of above
Answer: 3

19. Which of the following below are valid isolation levels in J2EE
  1. TRANSACTION_READ_UNCOMMITTED
  2. TRANSACTION_SERIALIZABLE
  3. Only A
  4. Both A and B
Answer: 4

20. The Externalise interface extends the serialise interface
  1. True
  2. False
Answer: 1

21. Converting a primitive type data into its corresponding wrapper class object instance is called
  1. boxing
  2. wrapping
  3. instantiation
  4. autoboxing
Answer: 4

22. Package of drawstring() method is
  1. java.applet
  2. java.io
  3. javax.swing
  4. java.awt
Answer: 4

23. Which method executes only once
  1. start() method
  2. init() method
  3. stop() method
  4. destroy() method
Answer: 2

24. Object which can store group of other objects is called
  1. Collection object
  2. Java object
  3. Package
  4. Wrapper
Answer: 1

25. All collection classes are available in
  1. java.io package
  2. java.lang package
  3. java.awt package
  4. java.util package
Answer: 4

26. Thread class is available in
  1. java.io package
  2. java.lang package
  3. java.awt package
  4. java.util package
Answer: 2

27. Minimum threads in a program are
  1. 1
  2. 2
  3. 5
  4. Many
Answer: 1

28. JIT meaning
  1. java in time
  2. just in time
  3. join in time
  4. none of above
Answer: 2

29. After the compilation of the java source code, which file is created by the JVM
  1. .class
  2. .java
  3. .cdr
  4. .doc
Answer: 1

30. Can we access private class outside the package
  1. Yes
  2. No
Answer: 2

31. Constructor has return type
  1. True
  2. False
Answer: 2

32. x=x+1 is equivalent to
  1. ++x
  2. x++
  3. x=x-1
  4. None of these
Answer: 2

33. If method have same name as class name and method don’t have any return type then it is known as
  1. Destructors
  2. Object
  3. Variable
  4. Constructor
Answer: 4

34. Methods that have same name, but different Parameter list and different definition known as
  1. Overriding
  2. Constructor
  3. Overloading
  4. none of these
Answer: 3

35. Inheritance means
  1. Sub class extends super class
  2. Sub class extends Base class
  3. Sub class create object of super class
  4. All of the above
Answer: 1

36. Which type of inheritance is not supported by java
  1. Single
  2. Multiple
  3. Multilevel
  4. Hierarchical
Answer: 2

37. String is the predefined
  1. Method
  2. Class
  3. Variable
  4. Object
Answer: 2

38. Super is the predefined
  1. Keyword
  2. Method
  3. Keyword and Method
  4. None of above
Answer: 3

39. Execution of the program is always begins with
  1. Main method
  2. class contain main method
  3. parent class
  4. default package
Answer: 1

40. All methods of interface are public and abstract
  1. True
  2. False
Answer: 1

Related

Questions 8356732693966547933

Post a Comment

SPAMMING will not be Appreciated.

emo-but-icon

Hot in week

Recent

Comments

Our Channel

Contact Us

Name

Email *

Message *

item