Questions

Q:

In the following pieces of code, B and D will compile without any error. True or false ?

A: StringBuffer sb1 = "abcd";

B: Boolean b = new Boolean("abcd");

C: byte b = 255;

D: int x = 0x1234;

E: float fl = 1.2;

A) TRUE B) FALSE
Answer & Explanation Answer: A) TRUE

Explanation:

The code segments B and D will compile without any error. A is not a valid way to construct a StringBuffer, you need to create a StringBuffer object using "new". B is a valid construction of a Boolean (any string other than "true" or "false" to the Boolean constructor will result in a Boolean with a value of "false"). C will fail to compile because the valid range for a byte is -128 to +127 (i.e., 8 bits, signed). D is correct, 0x1234 is the hexadecimal representation in java. E fails to compile because the compiler interprets 1.2 as a double being assigned to a float (down-casting), which is not valid. You either need an explicit cast, as in "(float)1.2" or "1.2f", to indicate a float.

Report Error

View Answer Workspace Report Error Discuss

6 6948
Q:

Which of the following schemes was launched to promote basic education in India and attract children in school going age to attend the classes

A) Pulse Polio Abhiyan B) Operation Flood
C) Mid Day Meal scheme D) None of these
 
Answer & Explanation Answer: C) Mid Day Meal scheme

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Economy

4 6945
Q:

Who was the first ruler of Pala Dynasty?

 

A) Mahendra Pala B) Gopala
C) Dharampala D) No option is correct
 
Answer & Explanation Answer: B) Gopala

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History
Exam Prep: Bank Exams

0 6944
Q:

The hymns of ' Rigaveda ' are the work of

A) one author B) four author
C) seven author D) many author
 
Answer & Explanation Answer: D) many author

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History

4 6940
Q:

How many birthdays does the average person have?

Answer

Any person can have only 1 birthday i.e, the day he was born. And every year we celebrate it's anniversaries.

Report Error

View answer Workspace Report Error Discuss

9 6939
Q:

Variable number of tandem repeats (VNTRs) in the DNA molecule are highly useful in

A) Recombinant DNA technology B) Monoclonal antibody production
C) Stemcell culture D) DNA fingerprinting
 
Answer & Explanation Answer: D) DNA fingerprinting

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Biology
Exam Prep: AIEEE

23 6938
Q:

Select the synonym of

 

panorama

 

A) puny B) wee
C) diminutive D) spectacle
 
Answer & Explanation Answer: D) spectacle

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams

0 6938
Q:

The slogan No taxation without representation was first raised during the American Revolution in

A) Boston Tea Party B) Massachussets Assembly
C) Philadelphia Congress D) None of these
 
Answer & Explanation Answer: B) Massachussets Assembly

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World History

13 6936