IT Trainer Questions


Q:

Which class of IP address provides a maximum of only 254 host addresses per network ID?

A) Class A B) Class B
C) Class C D) Class D
 
Answer & Explanation Answer: C) Class C

Explanation:

Class C network address has only 8 bits for defining hosts : 28-2 = 256 - 2 = 254

Report Error

View Answer Workspace Report Error Discuss

7 8824
Q:

void waitForSignal() {

Object obj = new Object();

synchronized (Thread.currentThread()) {

obj.wait();

obj.notify();

}

}

Which statement is true?

A) This code can throw an InterruptedException. B) This code can throw an IllegalMonitorStateException.
C) This code can throw a TimeoutException after ten minutes D) All the above
 
Answer & Explanation Answer: B) This code can throw an IllegalMonitorStateException.

Explanation:

It will throw  IllegalMonitorStateException.

Report Error

View Answer Workspace Report Error Discuss

Filed Under: Java - Technology
Job Role: IT Trainer

2 3604
Q:

Inside an interface when should the variables be initialized?

A) Globally B) Whenever required
C) Inside a function D) During the time of declaration
 
Answer & Explanation Answer: D) During the time of declaration

Explanation:

They should be initialized during the time of declaration itself otherwise it is a compilation eror

Report Error

View Answer Workspace Report Error Discuss

Filed Under: Java - Technology
Job Role: IT Trainer

0 1919
Q:

X implements Y extends Z

A) X can be class Y,Z are interfaces B) X is an interface Y,Z are classes
C) X,Y are classes Z is an interface D) Complilation error
 
Answer & Explanation Answer: D) Complilation error

Explanation:

It is a compilation error it should be X extends Y implements Z

Report Error

View Answer Workspace Report Error Discuss

Filed Under: Java - Technology
Job Role: IT Trainer

0 1883
Q:

Which operator performs pattern matching ?

A) LIKE operator B) EXISTS operator
C) BETWEEN operator D) None of these
 
Answer & Explanation Answer: A) LIKE operator

Explanation:

LIKE is a keyword that is used in the WHERE clause. Basically, LIKE allows us to do a search based operation on a pattern rather than specifying exactly what is desired (as in IN) or spell out a range (as in BETWEEN).

The syntax is as follows:
SELECT "column_name"
FROM "table_name"
WHERE "column_name" LIKE {PATTERN}

{PATTERN} often consists of wildcards. In SQL, there are two wildcards:



% (percent sign) represents zero, one, or more characters.
_ (underscore) represents exactly one character.

Report Error

View Answer Workspace Report Error Discuss

1 1706
Q:

Which of the following method declarations are allowed inside interface?

A) public void m1() B) private void m1()
C) protected void m1() D) abstract public void m1()
 
Answer & Explanation Answer: D) abstract public void m1()

Explanation:

Inside an interface every method will be by default abstract and public

Report Error

View Answer Workspace Report Error Discuss

Filed Under: Java - Technology
Job Role: IT Trainer

0 1677
Q:

There are 100 students in 3 sections A, B and C of a class. The average marks of all the three sections was 84. The average of B and C was 87.5 and the average marks of students in A section was :

A) 20 B) 35
C) 54 D) 40
 
Answer & Explanation Answer: A) 20

Explanation:

Numbers of students in section A = x
∴ Numbers of students in section B and C = (100 – x)
∴ x 70 + (100 – x) 87.5 = 84 100
=> 70x + 87.5 100 – 87.5x = 8400
=> 8750 – 17.5x = 8400
=> 17.5x = 8750 – 8400 => x = 20.

Report Error

View Answer Workspace Report Error Discuss

14 1659
Q:

What is Marker Interface?

Answer

An interface without having any methods and by implementing that interface if our objects will get same ability such type interfaces are called marker interface (or) ability interface (or) tag interface

Report Error

View answer Workspace Report Error Discuss

Subject: Java - Technology
Job Role: IT Trainer

0 1494