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 we override constructors in java?

1207


Which software is used for java programming?

1078


Can private class be inherited in java?

1083


What does the “static” keyword mean?

1165


Can set contain duplicates?

1045


Is arraylist dynamic in java?

1052


Where is const variable stored?

986


What is the default access specifier for variables and methods of a class?

1253


What is java english?

1081


What are the different approaches to implement a function to generate a random number?

1101


What is difference between length and length() method in java ?

1049


Is simpledateformat safe to use in the multithreaded program?

1048


What are access specifiers available in java?

1056


Explain about automatic type conversion in java?

1086


Explain the purpose of garbage collection in Java?

1076