top of page
  • Facebook
  • Twitter
  • Instagram

Placement Preparation Questions

Placement Preparation questions are free resources offered by mobiprep that can help you ace any company placement process. We have curated a list of the most important MCQ questions which are asked in most companies such as Infosys, TCS, Wipro, Accenture, etc. The placement preparation questions also have detailed explanations for every question ensuring you revise all the questions with detailed answers and explanations.

Q

31

which of these class is super class of every class in java?

a.

String

b.

Object

c.

Abstract

d.

Array list

Correct Answer & Explanation:

b

Object class is super class of every class in Java.

Q

32

Which operator is used to invert all the digits in binary representation of a number ?

a.

~

b.

<<<

c.

>>>

d.

^

Correct Answer & Explanation:

a

Unary not operator ~ inverts all of the bits of its operant in binary representation.

Q

33

What is the output of relational operators?

a.

Integer

b.

Boolean

c.

Characters

d.

Double

Correct Answer & Explanation:

b

Q

34

Which of these have highest precedence?

a.

()

b.

"++"

c.

*

d.

>>

Correct Answer & Explanation:

a

Order of precedence is (Highest to lowest) A> B > C > D

Q

35

Which of the following is a superclass of all exception type classes?

a.

Catchable

b.

RuntimeExceptions

c.

String

d.

Throwable

Correct Answer & Explanation:

d

Throwable is built in class and all exception type are subclass of this class.

Q

36

Which of these keywords are used for the block to handle the exceptions generated by try block?

a.

Try

b.

Catch

c.

Throw

d.

Check

Correct Answer & Explanation:

b

Q

37

Which of these are types of multitasking?

a.

Process based

b.

Thread based

c.

Process and thread based

d.

None of the above

Correct Answer & Explanation:

c

There are two types of multitasking: Process based multitasking and thread based multitasking.

Q

38

What does not prevent JVM from terminating?

a.

Process

b.

Daemon thread

c.

User thread

d.

JVM thread

Correct Answer & Explanation:

b

Daemon thread runs in the background and does not prevent JVM from terminating

Q

39

What is the output of this program? class Abc { public static void main(String[]args) { String[] elements = {“for”,”tea”,”too”}; String first =(elements.length>0)? } }

a.

b.

Compilation error

c.

An exception is thrown at runtime

d.

The variable first is set to elements[0]

Correct Answer & Explanation:

d

The value at the 0th position will be assigned to the variable first.

Q

40

All the variables of interface should be

a.

Default and final

b.

Default and static

c.

Public, static and final

d.

None of the above

Correct Answer & Explanation:

c

Variables of an interface are public, static and final by default because the interface cannot be instantiated.

bottom of page