Which of the following declaration is wrong?
int i=45;
float j = 45.0;
double k=45.0;

Answers were Sorted based on User's Feedback



Which of the following declaration is wrong? int i=45; float j = 45.0; double k=45.0;..

Answer / shukla.swapnil

float j = 45.0; <=== this declaration is wrong

Is This Answer Correct ?    24 Yes 5 No

Which of the following declaration is wrong? int i=45; float j = 45.0; double k=45.0;..

Answer / azad bajaj

Correct way to declare is
floar j= 45.0f;

Is This Answer Correct ?    19 Yes 4 No

Which of the following declaration is wrong? int i=45; float j = 45.0; double k=45.0;..

Answer / pranav

float j = 45.0; <- This statement is wrong

Correct way is:

float j = 45.0f;

Is This Answer Correct ?    12 Yes 1 No

Which of the following declaration is wrong? int i=45; float j = 45.0; double k=45.0;..

Answer / mohit

he is right.....

Is This Answer Correct ?    4 Yes 1 No

Which of the following declaration is wrong? int i=45; float j = 45.0; double k=45.0;..

Answer / rohit

by default it takes double.So we need to explicitly mention it as float

Is This Answer Correct ?    4 Yes 2 No

Post New Answer

More Java J2EE AllOther Interview Questions

how to deploy the web application ?

2 Answers   Accent,


Is it possible to create Userdefined Unchecked Exception also?If Yes, give an example?

1 Answers   HCL,


what is difference between vector and arraylist?.

4 Answers   C DAC, HCL,


what is the difference between through and throws?

2 Answers   HCL,


Which interface does java.util.hashtable implement?

0 Answers  






what is mean by hasing and maping in java platform and advantage?

0 Answers   CTS,


how to delete cookie information?and when it will delete?

3 Answers   SolutionNET,


How many controlers are there in spring? Plz send me ans

1 Answers   HCL,


Which server-side script takes the input from JavaScript, can access the database if it needs to, and processes the data.

0 Answers  


How is hashset maintained in memory by java ?

0 Answers  


What is deque in the java collections framework? : java collections

0 Answers  


How to implement or use the singleton class in java?

3 Answers  


Categories