0
Alien head

platforms and products Online Quiz - 47

Description: platforms and products Online Quiz - 47
Number of Questions: 20
Created by:
Tags: platforms and products
Attempted 0/20 Correct 0 Score 0

A Java Thread can be created by ____________

  1. Implementing Thread interface.

  2. Implementing Cloneable interface.

  3. Implementing the Runnable interface.

  4. We can not create a Thread, JVM has to create it by it's own.


Correct Option: C

StringBuffer vs StingBuilder

  1. StringBuilder is immutable but StringBuffer is mutable.

  2. StringBuffer is immutable but StringBuilder is mutable.

  3. StringBuffer is Synchronized but StringBuilder is not.

  4. They both are immutable.


Correct Option: C

Which Java operator is right associative?

  1. =

  2. +

  3. >>

  4. <


Correct Option: A

A Factory Pattern is a ___________

  1. singleton pattern.

  2. creational pattern.

  3. command design pattern.

  4. composite design pattern.


Correct Option: B

How can a dead thread be restarted?

  1. Thread.start()

  2. Thread.run()

  3. Thread.yield()

  4. A dead thread cannot be restarted.


Correct Option: D

What is this() in class?

  1. this() can be used to invoke a constructor of the same class

  2. this() will create the object of the same class

  3. There is no function called this(). It is a key word.

  4. this() will invoke the constructor of subclass


Correct Option: A

A transient variable can not be serialized.

  1. True

  2. False


Correct Option: A

We can extends String class.

  1. True

  2. False


Correct Option: B

Java supports 'Pass-By-Reference'

  1. True

  2. False


Correct Option: B

public abstract final method-name(arguments) {} //Can not be compiled?

  1. True

  2. False


Correct Option: B

The 'is-a' relationship is one of 'generalization'

  1. True

  2. False


Correct Option: B

Class.forName (String className) is a Dynamic class loading?

  1. True

  2. False


Correct Option: B

LinkedList is faster than ArrayList if we frequently add and remove the elements?

  1. True

  2. False


Correct Option: B

In HashMap we can add one null key and null value?

  1. True

  2. False


Correct Option: B

What is NullPointerException

  1. UncheckedException

  2. CheckedException

  3. Error

  4. UnspecifiedException


Correct Option: A

What will happen to the Exception object after exception handling?

  1. It will go for Garbage Collector

  2. It remains in Stack

  3. It will not create any object

  4. Exception objects will not put load on JVM


Correct Option: A

What is StackOverflowError and OutOfMemoryError?

  1. UncheckedException

  2. CheckedException

  3. Error

  4. UnspecifiedException


Correct Option: C

Java Exception Class is the subclass of

  1. java.lang.Error

  2. java.lang.Throwable

  3. java.lang.Util

  4. java.lang.CheckedException


Correct Option: B

Can we have try block with out catch?

  1. True

  2. False


Correct Option: A

In a node cluster, the Process Sentinels ($SWDIR\etc\procmgr) have a master process on one of the servers, which manages and controls slave process Sentinels on all the other servers in the node cluster.

  1. True

  2. False


Correct Option: B
+ View questions