|
Hello,
I'm fairly new with Java and I'm getting an error which dosen't logically make any sense to me. Any idea what I'm doing wrong?
double c = 2.2;
String str2 = c.toString();
I removed the header and brackets because that's not the issue here, but basically I've declared a double "c" = 2.2. Now I want to make a string called str2 that is equal to c.toString So that the string is 2.2 but in string format.
It'll just give me:
Error: double cannot be dereferenced
I know this is probably the most common newbie problem, but I can't get it for the life of me. Any help would be greatly appreciated.
Additionally, if you want to look at the more complex application of this, it is here:
if (x == 0)
{
polyString = c[x].toString() + polyString;
}
(I did declare the array c earlier in the class) I basically want to add that double at location x to the string.
|
|
|
My bad.
c is just a double and not an object.
so I had to use Double.toString(c)...
Well any other suggestions or comments please post, but I think I got it now.
Thanks!
|
|
|
You can also use String.valueOf(c)
|
|
|
It is nice to find a site about my interest. My first visit to your site is been a big help.pass4sure 70-290 Thank you for the efforts you been putting on making your site such an interesting and informative place to browse through. pass4sure 70-667 I'll be visiting your site again to gather some more valuable information. pass4sure 70-432 You truly did a good job.
|
|
|
First to come back before reaching your if .. what else means that you never called.
Secondly, the method returns a double is still trying to return a string in your case .. else.
Thirdly when you call toString () you need to use double instead the object of primitive type. So you must declare the BMI as a double (java.lang.Double) instead of double.recados para orkut
|
|
|
|
|
|
|
I know this is probably the most common newbie problem, but I can't get it for the life of me. Any <a href="http://orkutscrap.org/">Scraps</a> help would be greatly appreciated.
|
|
|
Correctly accomplished article writing will bring people an opportunity to get an academic <a href="http://orkutscrap.org/">Scraps</ success. However, term papers performing will use your free time. Thus that will be workable to buy essays online to prevent it.
|
|
|
Today I found a wonderful website,the site contained:
wedding dresses
cheap wedding dresses
Junior Bridesmaid Dresses
Cheap Homecoming Dresses
Cheap Quinceanera Dresses
Inexpensive bridesmaid dresses
Wholesale wedding dress
Wholesale wedding dress
Discount wedding dresses
Cheap Maternity Wedding Dresses
A-Line Wedding Dresses
Cheap Couture Wedding Dresses
Cheap Beach Wedding Dresses
Cheap Casual Wedding Dresses
Cheap Simple Wedding Dresses
Cheap Modest Wedding Dresses
Cheap Special Occasion Dresses
Cheap Evening Dresses
Cheap Prom Dresses
Cheap Little Black Dresses
Cheap Plus Size Wedding Dresses
Pink Wedding Dresses
Cheap Wedding Party Dresses
Cheap Bridesmaid Dresses
Cheap Flower Girl Dresses
Cheap Mother of the Bride Dresses
victoria's secret,
cheap wedding dresses,wholesale wedding dress,Wedding dresses 2011,Plus Size Wedding Dress wholesale,Couture Wedding Dress wholesale,Formal Wedding Dress wholesale,Bridesmaid Dresses wholesale,Discount Bridesmaid Dress wholesale,Junior Bridesmaids Dresses wholesale,Maternity Bridesmaid Dress wholesale,Cocktail Dress wholesale,Prom Dress wholesale,Evening Dress wholesale,Sexy Evening Dress wholesale,Stardoll Dress wholesale,Quinceanera Dress wholesale,Mother of the Bride Dress,Flower Girl Dress,Wedding Accessories wholesale
|
|
|
Prom Dresses are welcome marking Highlights adult female attractiveness is soft, beautiful and not well known. Attackef beauty of fashion boots, especialty is in fashion brand is loved by many women that fine liner and the beautiful hand-to product in each season, the comprehensive policy,Cocktail Dresses to show female is pure and noble sentiment, is mature and, Comment mad quite like that.Welcome to sheinside.com, here you will receive high-quality Flower Girl Dresses and best service. Here are stockists of designer and performance Fishtail Wedding Dress from all your favourite brands including Bridal Cocktail Dress, Retro Prom Dresses, Plus Sizes Bridesmaid Dress. You never know what kind of Beach Bridesmaid Dress will surprise you. There must be one pair of fashionSequin Prom Dresses for your wedding dresses. We will try our best to make you satisfied. Your support and encouragement will lead us to success.
|
|
|
|
|
Binweddingdress is your website for one-shop shopping for <a href="http://www.binweddingdress.com/accessories.html" title="Wedding accessories">Wedding accessories</a>, <a href="http://www.binweddingdress.com/wedding-ceremony.html" title="Wedding Ceremony Decorations">Wedding Ceremony Decorations</a>, <a href="http://www.binweddingdress.com/bridal-gowns.html" title="Bridal Gowns">Bridal Gowns</a>, <a href="http://www.binweddingdress.com/bridal-party-bridesmaids.html" title="Bridesmaid Dresses">Bridesmaid Dresses</a>, <a href="http://www.binweddingdress.com/prom.html" title="Prom Dresses">Prom Dresses</a>, <a href="http://www.binweddingdress.com/bridal-party.html" title="Party Dress">Party Dress</a>, <a href="http://www.binweddingdress.com/tuxedos.html" title="Tuxedos">Tuxedos</a>, <a href="http://www.binweddingdress.com/special-occasions.html" title="Special Occasion Dresses">Special Occasion Dresses</a>, <a href="http://www.binweddingdress.com/bridal-party-flower-girls.html" title="Flower Girl Dresses">Flower Girl Dresses</a>, mother of the bride dresses, <a href="http://www.binweddingdress.com/wedding-favors.html" title="Wedding Favors">Wedding Favors</a>, <a href="http://www.binweddingdress.com/wedding-party-gifts.html" title="Wedding Gifts">Wedding Gifts</a> and <a href="http://www.binweddingdress.com/wedding-reception.html" title="Wedding Reception Decorations">Wedding Reception Decorations</a>. Whether you are preparing to attend a formal evening wedding or a summer wedding on the beach, you will uncover your perfect 1 here. To each 1, we have a shape guide to help you locate the correct style for your body type, and we also stock an excellent range of colorful dresses.
|
|
|
When you?¡¥re trying to find a strapless or modest wedding dresses with distinctive style and exquisite detail, think about binweddingdress.
Regardless of whether you?¡¥re searching for a temple ready dress for an LDS wedding or want strapless wedding dresses, Binweddingdress will be the best option online Bridal Shops.
|
|
|
|
This 19 message thread spans 2 pages: [1] 2 > > |