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 / ranga reddy

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

if we declare float b = 1.o; by default it takes double value, then it will give compile time error as possiblelossofpression
then we declare as float b = 1.0f;

at this time System.out.println(a==b); gives

true

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What sorting algorithm does javascript use?

934


What are the limitations of procedural programming approach?

998


Can classes declared using the abstract keyword cab be instantiated?

1006


What is size_t?

935


What is the internal implementation of set in java?

881


What is return null in java?

900


How do singleton patterns work?

918


What is java ceil?

981


What is Applet Stub Interface ?

2423


What is role of void keyword in declaring functions?

992


Why does java does not support multiple inheritance? Explain

923


What are assembly attributes?

948


what are abstract functions?

974


What is garbage collection? Can it be forced to run?

951


Write a program to reverse array in place?

1015