Online Exam Quiz

questionQuestion  1 to 30

What is the extension of compiled Java classes?

  • .js
  • .txt
  • .class
  • .java
Mark for review

Which of these methods is a part of the Thread class?

  • run()
  • start()
  • stop()
  • All of the above
Mark for review

Which of these can be used to create an object in Java?

  • new
  • malloc
  • alloc
  • create
Mark for review

Which of the following is not a Java features?

  • Dynamic
  • Architecture Neutral
  • Use of pointers
  • Object-oriented
Mark for review

Which of these operators is used to allocate memory to an array variable in Java?

  • malloc
  • alloc
  • new
  • new malloc
Mark for review

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

  • pkg
  • import
  • package
  • importpackage
Mark for review

Which of these statements is incorrect about Thread?

  • start() method is used to begin execution of the thread that is defined by run().
  • run() method ends when execution of the thread ends.
  • A thread can be started by making a call to its start() method.
  • run() method is used to begin execution of a thread before start() method in special cases.
Mark for review

Which of the following is a reserved keyword in Java?

  • object
  • strictfp
  • system
  • main
Mark for review

Which method can be defined only once in a program?

  • main method
  • finalize method
  • static method
  • private method
Mark for review

Which keyword is used to create a new object?

  • malloc
  • alloc
  • new
  • create
Mark for review

Which method is used to schedule a thread for execution?

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

What is the default value of a local variable?

  • null
  • 0
  • depends on the data type
  • no default value
Mark for review

Which of the following is not a keyword in Java?

  • static
  • Boolean
  • void
  • private
Mark for review

Which of the following is a valid long literal?

  • 0xnf024L
  • ABH8097
  • L990023
  • 904423
Mark for review

Which of these methods is used to read a string from the input stream?

  • get()
  • getLine()
  • read()
  • readLine()
Mark for review

What does the expression 1.0 / 0.0 evaluate to in Java?

  • 0
  • NaN
  • Infinity
  • Runtime Exception
Mark for review

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

  • Polymorphism
  • Inheritance
  • Compilation
  • Encapsulation
Mark for review

Which method is the entry point for a Java application?

  • main
  • start
  • init
  • run
Mark for review

Which of the following is not an access modifier in Java?

  • protected
  • private
  • public
  • transient
Mark for review

What is the size of a byte variable in Java?

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

Which of these keywords is used to define interfaces in Java?

  • interface
  • Interface
  • intf
  • Intf
Mark for review

Which method of the class String is used to obtain length of String object?

  • get()
  • Sizeof()
  • lengthof()
  • length()
Mark for review

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

  • JVM
  • JRE
  • JDK
  • JDB
Mark for review

What is the use of the "instanceof" keyword?

  • Compare two objects
  • Check if object is of a particular class
  • Typecast object
  • None of the mentioned
Mark for review

Which of the following is used to handle an exception in Java?

  • catch
  • throw
  • catch and throw
  • try and catch
Mark for review

Which of these is returned by the operator '&'?

  • Character
  • Integer
  • Boolean
  • Float
Mark for review

Which of the following is not a Java statement?

  • for
  • while
  • continue
  • return
Mark for review

Which method is the starting point for all Java programs?

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

Which method must be implemented by all threads?

  • run()
  • start()
  • stop()
  • main()
Mark for review

What is the default value of a boolean variable in Java?

  • TRUE
  • FALSE
  • 0
  • 1
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