Searching for "he"

Q:

prp  qrp  prr  pqr  qrp  rpr  qqr  rpr  qpr  qrr qpr  qpr

If every third letter starting from the left is replaced by a number beginning with 1 then which letter/ number will be 16th from the right?

A) q B) r
C) 6 D) 7
 
Answer & Explanation Answer: D) 7

Explanation:

New sequence is as follows:

pr1  qr2  pr3  pq4  qr5  rp6  qq7  rp8  qp9  qr10  qp11  qp12

16th from the right  end is 7

Report Error

View Answer Report Error Discuss

Filed Under: Number Series

Q:

Which of the following groups of alphabets should replace the blank spaces so that the group of alphabets, given in bold, follow a logical pattern from the preceding and the following group of alphabets?

b w _ y z a,  d s t u v _ ,  _ o p q r e 

A) x, e, d B) x, c, f
C) x, e, n D) x, c, d
 
Answer & Explanation Answer: B) x, c, f

Explanation:

b w x y z a d s t u v cf o p q r e

Report Error

View Answer Report Error Discuss

Filed Under: Number Series

Q:

What is the importance of finally block in exception handling ?

Answer

A finally block will always be executed, whether or not an exception is actually thrown. Even in the case where the catch statement is missing and an exception is thrown, the finally block will still be executed. Last thing to mention is that the finally block is used to release resources like I/O buffers, database connections, etc.

Report Error

View answer Workspace Report Error Discuss

Subject: Java

Q:

What is the difference between Serial and Throughput Garbage collector ?

Answer

The throughput garbage collector uses a parallel version of the young generation collector and is meant to be used with applications that have medium to large data sets. On the other hand, the serial collector is usually adequate for most small applications (those requiring heaps of up to approximately 100MB on modern processors).

Report Error

View answer Workspace Report Error Discuss

Subject: Java

Q:

When is the finalize() called ? What is the purpose of finalization ?

Answer

The finalize method is called by the garbage collector, just before releasing the object’s memory. It is normally advised to release resources held by the object inside the finalize method.

Report Error

View answer Workspace Report Error Discuss

Subject: Java

Q:

What is the purpose of garbage collection in Java, and when is it used ?

Answer

The purpose of garbage collection is to identify and discard those objects that are no longer needed by the application, in order for the resources to be reclaimed and reused.


 

Report Error

View answer Workspace Report Error Discuss

Subject: Java

Q:

What’s the difference between Enumeration and Iterator interfaces ?

Answer

Enumeration is twice as fast as compared to an Iterator and uses very less memory. However, the Iterator is much safer compared to Enumeration, because other threads are not able to modify the collection object that is currently traversed by the iterator. Also, Iteratorsallow the caller to remove elements from the underlying collection, something which is not possible with Enumerations.

Report Error

View answer Workspace Report Error Discuss

Subject: Java

Q:

What do you know about the big-O notation and can you give some examples with respect to different data structures ?

Answer

The Big-O notation simply describes how well an algorithm scales or performs in the worst case scenario as the number of elements in a data structure increases. The Big-O notation can also be used to describe other behavior such as memory consumption. Since the collection classes are actually data structures, we usually use the Big-O notation to chose the best implementation to use, based on time, memory and performance. Big-O notation can give a good indication about performance for large amounts of data.

Report Error

View answer Workspace Report Error Discuss

Subject: Java