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

Explain constructors and types of constructors in java.

1182


Can we have multiple catch block for a try block?

1069


Can we serialize singleton class?

1091


Explain yield() method in thread class ?

1118


Where is java located?

1122


why Java does not support multiple inheritances?

1206


Explain listiterator and methods in listiterator?

1065


Define how does a try statement determine which catch clause should be used to handle an exception?

1254


How do I run java on windows?

1244


What is the difference between static binding and dynamic binding?

1198


Explain tree set and its features?

1115


How do listeners work?

1104


Can a class extend 2 classes in java?

1096


Are maps ordered java?

1001


Explain features of interfaces in java?

1057