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 are the different conditional statements?

989


Does every java program need a main?

993


How many bytes is a char in java?

1016


Can a main method be declared final?

1053


How can an object be unreferenced?

1021


Why char array is favored over string for the storage of passwords?

1072


When arithmeticexception is thrown?

1029


How do constructors use this() and super()?

1116


How do you sort arrays in java?

927


What is use of arraylist in java?

1176


Can we have two methods in a class with the same name?

1051


Which is faster call by value or call by reference?

932


What is singleton class and how can we make a class singleton?

1100


What is the finalize method do?

1097


Why hashset is used in java?

1067