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 / aruna

this code will not compile since 1.0 will be taken as a
double instead of float, To make this code work, the
following changes shud b done

float b=1.0f;
or double = 1.0;

with these changes the SOP statement will print "true"

Is This Answer Correct ?    15 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can java inner class be static?

976


Why can't we use static class instead of singleton?

888


Can you explain inner class.

1022


What is the benefit of singleton pattern?

933


What is difference between java and java ee?

969


how its run?

1008


How do you check if two strings are equal in java?

973


what is the constructor and how many types of constructors are used in java?

949


Are maps ordered java?

898


What is space character in java?

1038


What is a package in java? List down various advantages of packages.

1201


What is comparable and comparator interface? List their differences

1034


What is the purpose of using javap?

1029


How strings are created in java?

975


What is meant by polymorphism?

959