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...

What happens when you assigned a 'double' value to
a 'String'?

Answer Posted / cleon

@Pankaj:
What are you trying to do?, trying to call a function from
primitive type/reference, that that will never work. You can
call function on Object types.

Double d = 5.5D; //D is optional as by default it is treated
to be double value
String s = d.toString();

If one tries to do something like
String s = 5.5;
A type mismatch errors will be shown during compilation itself!!

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we call the run() method instead of start()?

1022


Difference between operator overloading and function overloading

1047


Is hashset sorted in java?

1165


Why deletion in linkedlist is fast than arraylist?

1075


How can you avoid serialization in child class if the base class is implementing the serializable interface?

1067


What does a void function return?

984


How destructors are defined in java?

1168


Is java hard to learn?

892


What happens when a thread cannot acquire a lock on an object in java programming?

994


Why runnable interface is used in java?

1116


What is used of static keyword in java?

1050


What are sets in java?

927


What is a class object?

952


What do you mean by aggregation?

1292


What does += mean coding?

910