Online Exam Quiz

questionQuestion  1 to 30

What is the purpose of the volatile keyword in Java?

  • To increase the access level
  • To indicate that a variable may be changed unexpectedly
  • To mark a method as synchronized
  • To create a constant variable
Mark for review

Which of these methods is used to access members of a class in Java?

  • dot operator (.)
  • arrow operator (->)
  • star operator (*)
  • pointer operator (&)
Mark for review

Which of these operators is used to refer to the current instance of a method or a constructor?

  • this
  • super
  • extern
  • this()
Mark for review

Which of the following is not a valid Java keyword?

  • transient
  • volatile
  • const
  • synchronized
Mark for review

Which of the following is not a valid Java keyword?

  • strictfp
  • constant
  • goto
  • native
Mark for review

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

  • Inheritance
  • Encapsulation
  • Polymorphism
  • Compilation
Mark for review

Which operator is considered to be with the highest precedence?

  • ()
  • =
  • ?:
  • ++
Mark for review

Which of these standard collection classes implements a dynamic array?

  • ArrayList
  • LinkedList
  • HashSet
  • HashMap
Mark for review

Which class is used to read characters in Java?

  • FileReader
  • FileInputStream
  • BufferedInputStream
  • DataInputStream
Mark for review

Which of these interface is not a part of Java?s collection framework?

  • List
  • Set
  • SortedList
  • Queue
Mark for review

Which of the following is a valid declaration of a char?

  • char ch = '\utea';
  • char ch = '\uTEA';
  • char ch = '\utea';
  • All of the above
Mark for review

What is the purpose of the 'super' keyword in Java?

  • To call a method in the superclass
  • To call a method in the same class
  • To call a method in the subclass
  • To call a method in the parent interface
Mark for review

In which package is the JDBC API included?

  • javax.swing
  • java.net
  • java.sql
  • java.util
Mark for review

Which of the following is used for inter-thread communication in Java?

  • notify()
  • wait()
  • notifyAll()
  • All of the above
Mark for review

Which method is used to perform cleanup operations before an object is garbage collected?

  • finalize()
  • clean()
  • finalizeAll()
  • close()
Mark for review

In which memory a String is stored, when we create a string using new operator?

  • Stack
  • String Pool
  • Heap memory
  • Random memory
Mark for review

Which keyword is used for accessing the features of a package?

  • pkg
  • Pkg
  • import
  • Import
Mark for review

What is the main advantage of using Java's multithreading?

  • Increased complexity
  • Reduced performance
  • Improved user experience
  • Lower memory usage
Mark for review

Which of the following is true about a static method?

  • It can access instance variables
  • It can be overridden
  • It cannot be called from a static context
  • It can be called using the class name
Mark for review

Which of the following is used to find and fix bugs in the Java programs?

  • JVM
  • JRE
  • JDK
  • JDB
Mark for review

When a thread is created and started, what is its initial state?

  • Ready
  • Running
  • Waiting
  • Sleeping
Mark for review

What is the base class of all classes in Java?

  • Object
  • Class
  • Base
  • Root
Mark for review

Which of these cannot be used for a variable name in Java?

  • identifier & keyword
  • identifier
  • keyword
  • None of the above
Mark for review

Which method in the Servlet interface is called once to initialize the servlet?

  • init()
  • start()
  • initServlet()
  • service()
Mark for review

Which method is used to find the length of a string in Java?

  • length()
  • size()
  • getLength()
  • Length()
Mark for review

Which of the following is true about the String class in Java?

  • Strings are mutable
  • Strings are immutable
  • Strings are of fixed length
  • Strings are primitive types
Mark for review

What does the 'super' keyword in Java do?

  • Refers to the current object
  • Refers to the parent class object
  • Refers to a static method
  • Refers to a private method
Mark for review

Which of the following is a checked exception?

  • NullPointerException
  • ClassCastException
  • IOException
  • ArrayIndexOutOfBoundsException
Mark for review

What is the default access modifier in Java?

  • private
  • protected
  • public
  • package-private
Mark for review

Which of these classes is not a member class of java.io package?

  • File
  • String
  • Writer
  • Reader
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