Online Exam Quiz

questionQuestion  1 to 30

Which method is used to perform some action when the object is to be destroyed?

  • delete()
  • finalize()
  • none()
  • destroy()
Mark for review

Which class is the parent class of all classes in Java?

  • java.lang.Object
  • java.lang.String
  • java.lang.System
  • java.lang.Exception
Mark for review

Which method is used to start a thread in Java?

  • run()
  • start()
  • init()
  • begin()
Mark for review

What is the size of a char variable in Java?

  • 8 bits
  • 16 bits
  • 32 bits
  • 64 bits
Mark for review

What is the default value of an instance variable in Java?

  • 0
  • null
  • Depends on the data type
  • None of the above
Mark for review

Which of the following is not a Java feature?

  • Object-oriented
  • Use of pointers
  • Platform independent
  • Secure
Mark for review

Which of these packages contains the Exception class?

  • java.io
  • java.lang
  • java.util
  • java.net
Mark for review

What is the purpose of the wait(), notify(), and notifyAll() methods in Java?

  • To perform inter-thread communication
  • To perform thread synchronization
  • To handle exceptions
  • None of the above
Mark for review

What is the size of an int variable in Java?

  • 8 bits
  • 16 bits
  • 32 bits
  • 64 bits
Mark for review

Which of the following is a marker interface?

  • Serializable
  • Cloneable
  • Remote
  • All of the above
Mark for review

What is used to achieve multiple inheritance in Java?

  • Interfaces
  • Abstract classes
  • Both
  • None of the above
Mark for review

Which of the following is a marker interface?

  • Serializable
  • Cloneable
  • Remote
  • All of the above
Mark for review

Which of the following is used to handle exceptions in Java?

  • try-catch block
  • finally block
  • throw statement
  • All of the above
Mark for review

Which of the following statements is true?

  • JRE is a subset of JDK
  • JDK is a subset of JRE
  • JVM is a subset of JRE
  • JRE and JDK are subsets of JVM
Mark for review

Which keyword is used to declare a constant variable?

  • final
  • static
  • const
  • immutable
Mark for review

What is the size of an int variable in Java?

  • 8 bits
  • 16 bits
  • 32 bits
  • 64 bits
Mark for review

Which method is used to convert a string to an integer in Java?

  • parseInt()
  • parseInteger()
  • toInt()
  • toInteger()
Mark for review

Which method is used to stop the execution of a thread?

  • stop()
  • wait()
  • sleep()
  • terminate()
Mark for review

Which of these methods is used to register a thread in a thread scheduler?

  • run()
  • start()
  • register()
  • None of the above
Mark for review

Which of the following is a marker interface in Java?

  • Runnable
  • Serializable
  • Remote
  • ResultSet
Mark for review

Which of the following is not a valid flow control statement?

  • if
  • continue
  • exit
  • break
Mark for review

Which of the following is not an OOPS concept in Java?

  • Polymorphism
  • Inheritance
  • Compilation
  • Encapsulation
Mark for review

Which of the following is true about inheritance in Java?

  • A class can inherit multiple classes
  • A class can implement multiple interfaces
  • A class can extend multiple interfaces
  • A class can implement multiple classes
Mark for review

Which method can be used to start a thread execution?

  • run()
  • start()
  • init()
  • resume()
Mark for review

What is the return type of the hashCode() method in the Object class?

  • int
  • Object
  • long
  • void
Mark for review

Which of the following is a reserved keyword in Java?

  • array
  • goto
  • constant
  • var
Mark for review

How many times is the do while loop guaranteed to execute?

  • 0
  • 1
  • 2
  • infinite
Mark for review

Which of these is an interface in the Collections Framework?

  • ArrayList
  • HashSet
  • LinkedList
  • Set
Mark for review

Which of the following is a superclass of every class in Java?

  • ArrayList
  • Abstract class
  • Object class
  • String class
Mark for review

Which package contains the Random class?

  • java.util
  • java.lang
  • java.io
  • java.net
Mark for review

blinkerOnline

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • Answered
  • Not Answered
  • Marked for Review