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

Can a string be null?

975


What does \ mean in regex?

1210


What is a literal coding?

1019


What is a priority queue java?

985


What is lazy initialization in java?

1002


How can we create objects if we make the constructor private ?

992


Explain the difference between treeset and treemap in java?

968


What is the importance of main method in Java?

1055


What is an infinite loop? How infinite loop is declared?

1102


How finally used under exception handling?

944


Can I extend singleton class in java?

1097


What is a parameter in matrices?

1045


Is it necessary that each try block must be followed by a catch block?

1014


Explain different states of a thread in java?

1054


How many types of array are there?

1005