Online Exam Quiz

questionQuestion  1 to 30

Which of the following is not a feature of Java?

  • Object-oriented
  • Use of pointers
  • Portable
  • Dynamic
Mark for review

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

  • identifier
  • keyword
  • letter
  • underscore
Mark for review

Which of the following is not a Java keyword?

  • class
  • interface
  • extends
  • pointer
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 these can be used to create an object in Java?

  • new
  • malloc
  • alloc
  • create
Mark for review

Which method must be implemented by all threads?

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

Which of the following is not a valid way to create an array in Java?

  • int[] arr = new int[5];
  • int[] arr = {1, 2, 3, 4, 5};
  • int arr[] = new int[5];
  • int arr() = new int[5];
Mark for review

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

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

Which operator is used to perform the modulo operation?

  • %
  • /
  • *
  • &
Mark for review

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

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

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

  • Inheritance
  • Encapsulation
  • Polymorphism
  • Compilation
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 is returned by the operator '&'?

  • Character
  • Integer
  • Boolean
  • Float
Mark for review

Which of these classes are thread-safe in Java?

  • Vector
  • ArrayList
  • LinkedList
  • None of the above
Mark for review

Which of these are selection statements in Java?

  • break, continue
  • for, do, while
  • if, switch
  • try, catch
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 methods is a part of the Object class?

  • notify(), wait(), sleep()
  • notify(), wait(), clone()
  • sleep(), wait(), notifyAll()
  • sleep(), wait(), getObject()
Mark for review

Which keyword is used to create a new object?

  • malloc
  • alloc
  • new
  • create
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 operator is used to test if a particular property exists or not?

  • in
  • instanceof
  • typeof
  • None of the mentioned
Mark for review

Which of the following is a valid long literal?

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

Which exception is thrown when java is out of memory?

  • MemoryError
  • OutOfMemoryError
  • MemoryOutOfBoundsException
  • MemoryFullException
Mark for review

Which of these packages contains the exception StackOverflowError?

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

Which keyword is used to declare a constant in Java?

  • const
  • final
  • static
  • constant
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 method is the entry point for a Java application?

  • main
  • start
  • init
  • run
Mark for review

What is the size of int variable in Java?

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

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

  • TRUE
  • FALSE
  • 0
  • 1
Mark for review

What is the default value of the Boolean variable?

  • TRUE
  • FALSE
  • null
  • not defined
Mark for review

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

  • package
  • import
  • extends
  • implements
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