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 inherit a class with private constructor?

1179


What are the supported platforms by java programming language?

1089


How to convert string to char and vice versa?

1050


What is an example of a boolean?

1117


how we can create packages in java?

1016


Is zero a positive integer?

1143


Why does java have two ways to create child threads?

1003


Print Vertical traversal of a Binary Tree.

1064


What is split return?

1087


Is it possible for a yielded thread to get chance for its execution again?

998


can any body body expalin best definitions & best real time exaples for opps concepts.

2319


Can a singleton class be inherited?

1013


Mention some features of java?

1010


What is return used for in java?

1069


What is a line break?

1078