Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

int a=1;
float b=1.0;
System.out.println(a==b);

Answer Posted / anil kumar rai

error found when compile this code;
if u write 1 in place of 1.0 then output would be "true" or
if u write double in place of float then output would be
same :"true"

thank you

Is This Answer Correct ?    13 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of a parameter?

1079


How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters?

1100


Difference between == and .equals() ?

1011


What are features of java?

1033


Assume a thread has lock on it, calling sleep() method on that thread will release the lock?

1113


What is main method?

1049


Which list is sorted in java?

1042


What is one third plus one third as a fraction?

942


What is member in java?

1041


What is an abstract class and what is it’s purpose?

963


Can we declare an array without size in java?

1024


What is scope & storage allocation of global and extern variables? Explain with an example

1048


What is object-oriented programming?

1129


Why are lists ordered in java?

1019


What is static block?

1136