Q:

When do you override hashcode and equals() ?

Answer

HashCode method return int value. So the Hash value is the int value returned by the hash function .


If you want to do equality check or want to use your object as key in HashMap, we must override hashcode and equals() method.

Report Error

View answer Workspace Report Error Discuss

Subject: Java
Job Role: Analyst , IT Trainer

5 2873
Q:

Which is the next number in the sequence:

1, 3, 6, 11, 20, 37, ??

A) 49 B) 56
C) 64 D) 70
 
Answer & Explanation Answer: D) 70

Explanation:

Here the given series is 1, 3, 6, 11, 20, 37, ??,

and the logic behind the series is

1 x 2 + 1 = 3

3 x 2 + 0 = 6

6 x 2 + (-1) = 11

11 x 2 + (-2) = 20

20 x 2 + (-3) = 37

37 x 2 + (-4) = 70

 

Hence, the next number in the given series is 70.

Report Error

View Answer Report Error Discuss

5 22504
Q:

M, K, J, T, R, D and W are seven members of a family. There are two married couples among them belonging to two different generations. Each of them has a different choice of cuisine - Chinese, Continental, Thai, Punjabi, South Indian, Gujarati and Malwani. The grandfather in the family likes Gujarati food. None of the ladies likes Continental or Thai food. T is the son of M, who likes Chinese food. W is J's daughter-in-law and she likes South Indian food. K is grandfather of D, who likes Punjabi food. J is mother of R, who likes Continental food.

Question 1:

How is R related to D?

a) Father b) Brother c) Uncle d) Data inadequate

 

Question 2:

Which of the following group contains one each from the same generations?

a) JRT b) JRW c) MRD  d) MWT

Answer

Answer 1:
c) Uncle
R is Uncle to D.


 


Answer 2:
a) JRT
JRT are one each from the same generations.

Report Error

View answer Workspace Report Error Discuss

5 6304
Q:

Which of the following is not an aerosol?

A) mud B) dust
C) smoke D) fog
 
Answer & Explanation Answer: A) mud

Explanation:

Among the given options, mud is not an aerosol.

 

An aerosol is a suspension of fine solid particles or liquid droplets, in the air or another gas. Aerosols can be natural or anthropogenic. Examples of natural aerosols are fog, dust, forest exudates and geyser steam. Examples of anthropogenic aerosols are haze, particulate air pollutants, and smoke.

Report Error

View Answer Report Error Discuss

Filed Under: Physics
Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Analyst , Bank Clerk , Bank PO , IT Trainer

5 3479
Q:

Which elements are most abundant in living organisms?

A) oxygen, nitrogen, carbon, hydrogen, sulfur, and phosphorus B) carbon, potassium, iron, magnesium, hydrogen, and nitrogen
C) hydrogen, carbon, calcium, potassium, oxygen, and phosphorus D) oxygen, calcium, phosphorus, sodium, hydrogen, and carbon
 
Answer & Explanation Answer: A) oxygen, nitrogen, carbon, hydrogen, sulfur, and phosphorus

Explanation:

Living organisms often contain trace amounts of several elements, but the most abundant ones are oxygen, carbon, hydrogen, nitrogen, calcium, sulphur and phosphorus.

Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Analyst , Bank Clerk , Bank PO , IT Trainer

5 1562
Q:

Merdeka cup is associated with

A) Badminton B) Tennis
C) Football D) Hockey
 
Answer & Explanation Answer: C) Football

Explanation:

Merdeka cup is associated with Football in Indonesia.

Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

5 6818
Q:

Which of the following data structure is linear type?

A) Tree B) Binary Tree
C) Queue D) Graph
 
Answer & Explanation Answer: C) Queue

Explanation:

A data structure is a specialized format for organizing and storing data. General data structure types include the array, the file, the record, the table, the tree, and so on. Any data structure is designed to organize data to suit a specific purpose so that it can be accessed and worked with in appropriate ways.

 

Linear data structure: A linear data structure traverses the data elements sequentially, in which only one data element can directly be reached.

Ex: Arrays, Linked Lists, Stack, Queue, Any type of List all are linear.

 

Trees like Binary Tree, B Tree or B+ Tree are examples of non linear data structure.

Report Error

View Answer Report Error Discuss

5 1998
Q:

Valve between the left ventricle and Aorta?

A) Pulmonic valve B) Tricuspid valve
C) Aortic valve D) Mitral valve
 
Answer & Explanation Answer: C) Aortic valve

Explanation:

The Aortic valve - located between the left ventricle and the aorta

The Mitral valve - located between the left atrium and left ventricle

The Tricuspid valve - located between the right atrium and the right ventricle (and) 

The Pulmonary (pulmonic) valve - located between the right ventricle and the pulmonary artery.

Report Error

View Answer Report Error Discuss

Filed Under: General Science
Exam Prep: AIEEE , Bank Exams
Job Role: Analyst , Bank Clerk , Bank PO

5 1341