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 5250
Q:

Which category of Hydrogen releases water vapour and a by product when burnt?

 

A) Green Hydrogen B) Blue Hydrogen
C) Red Hydrogen D) Black Hydrogen
 
Answer & Explanation Answer: A) Green Hydrogen

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Chemistry
Exam Prep: AIEEE , Bank Exams

2 5246
Q:

Cellulose is a

A) Mineral B) Protein
C) Fat D) Carbohydrate
 
Answer & Explanation Answer: D) Carbohydrate

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Biology

15 5244
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 5234
Q:

Which is the first Indian company to be listed on NASDAQ ?

A) Reliance B) TCS
C) HCL D) Infosys
 
Answer & Explanation Answer: D) Infosys

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: Bank Exams
Job Role: Bank PO

12 5232
Q:

The National institute of Oceangraphy is located at

A) Goa B) Mumbai
C) Cochin D) Kandla
 
Answer & Explanation Answer: A) Goa

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography

8 5231
Q:

______________ kills the germs present in the water.

 

A) Evaporation B) Rehydration
C) Boiling D) Desiccation
 
Answer & Explanation Answer: C) Boiling

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Science
Exam Prep: Bank Exams

0 5229
Q:

You can use ______ to copy selected text, and ____to paste it in a document

A) CTRL+C, CTRL+V B) CTRL+C, CTRL+P
C) SHIFT+C, ALT+V D) SHIFT+C, ALT+P
 
Answer & Explanation Answer: A) CTRL+C, CTRL+V

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Computer
Exam Prep: Bank Exams
Job Role: Bank PO

26 5227