Questions

Q:

What is the output after compile and run the following code ?

int Output = 10;
boolean b = false;
if((b == true) && ((Output += 10) == 20))
{
System.out.println("We are equal " + Output);
}
else
{
System.out.println("Not equal! " + Output);
}

A) Compilation and output of "We are equal 10" B) Compilation and output of "Not equal! 10"
C) Compilation error, attempting to perform binary comparison on logical data type D) Compilation and output of "Not equal! 20"
 
Answer & Explanation Answer: B) Compilation and output of "Not equal! 10"

Explanation:

The output will be "Not equal! 10". Please note that && is logical AND operator. If first operand before (&&) is false then the other operand will not be evaluated. This illustrates that the Output +=10 calculation was never performed because processing stopped after the first operand was evaluated to be false. If you change the value of b1 to true, processing occurs as you would expect and the output would be "We are equal 20".

Report Error

View Answer Report Error Discuss

Filed Under: Oracle Certification
Job Role: Analyst

6 5188
Q:

Which company has launched the world's first automated opening bandsets, titled PEBL, in the Indian Market?

A) Nokia B) Motorola
C) Samsung D) LG
 
Answer & Explanation Answer: B) Motorola

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Business Awareness

26 5188
Q:

Lodi dynasty was founded by _____.

A) Bahlol Lodi B) Khizr Khan
C) Ibrahim Lodi D) Sikandar Lodi
 
Answer & Explanation Answer: A) Bahlol Lodi

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History
Exam Prep: Bank Exams

17 5187
Q:

Today __________ are seen as personal accessory - portable, powerful and simple to operate.

 

A) e-mail B) e-business  
C) e-content   D) Computers
 
Answer & Explanation Answer: D) Computers

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Computer
Exam Prep: Bank Exams

2 5187
Q:

The non green heterotrophic plants of plant kingdom are

A) Algae B) Fungi
C) Ferns D) Both B & C
 
Answer & Explanation Answer: B) Fungi

Explanation:

The non green heterotrophic plants of plant kingdom are Fungi.

Report Error

View Answer Report Error Discuss

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

10 5187
Q:

Which of the following is an endocrine gland?

A) Mammary glands B) Apocrine sweat glands
C) Reproductive glands D) Salivary glands
 
Answer & Explanation Answer: C) Reproductive glands

Explanation:

Endocrine glands are glands of the endocrine system that secrete their products, hormones, directly into the blood rather than through a duct.

 

The major glands of the endocrine system include:

pineal gland,

pituitary gland,

pancreas,

ovaries,

testes,

thyroid gland,

parathyroid gland,

hypothalamus and

adrenal glands.

Report Error

View Answer Report Error Discuss

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

2 5186
Q:

Logical puzzle

 A boy and a girl are talking.
"I am a boy" - said the child with black hair.
"I am a girl"  - said the child with white hair.

At least one of them lied. Who is the boy and who is the girl?

Answer

Our Solution:


They both lied.
The child with the black hair is the girl, and the child with the white hair is the boy.
(If only one lied they would both be boys or both be girls)

Report Error

View answer Workspace Report Error Discuss

Subject: Logic Puzzles

18 5185
Q:

For every relationship, how many possible types of actions are there when enforcing minimum cardinalities?

A) Two B) Three
C) Four D) Six
 
Answer & Explanation Answer: D) Six

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Database

3 5184