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

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.

Answer: 3

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.

Answer: 3

Which Java operator is right associative?

  1. =

  2. +

  3. >>

  4. <

Answer: 1

A Factory Pattern is a ___________

  1. singleton pattern.

  2. creational pattern.

  3. command design pattern.

  4. composite design pattern.

Answer: 2

How can a dead thread be restarted?

  1. Thread.start()

  2. Thread.run()

  3. Thread.yield()

  4. A dead thread cannot be restarted.

Answer: 4

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

Answer: 1

A transient variable can not be serialized.

  1. True

  2. False

Answer: 1

We can extends String class.

  1. True

  2. False

Answer: 2

Java supports 'Pass-By-Reference'

  1. True

  2. False

Answer: 2

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

  1. True

  2. False

Answer: 2

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

  1. True

  2. False

Answer: 2

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

  1. True

  2. False

Answer: 2

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

  1. True

  2. False

Answer: 2

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

  1. True

  2. False

Answer: 2

What is NullPointerException

  1. UncheckedException

  2. CheckedException

  3. Error

  4. UnspecifiedException

Answer: 1

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

Answer: 1

What is StackOverflowError and OutOfMemoryError?

  1. UncheckedException

  2. CheckedException

  3. Error

  4. UnspecifiedException

Answer: 3

Java Exception Class is the subclass of

  1. java.lang.Error

  2. java.lang.Throwable

  3. java.lang.Util

  4. java.lang.CheckedException

Answer: 2

Can we have try block with out catch?

  1. True

  2. False

Answer: 1

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

Answer: 2
+ View questions