Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Beginning Java
how to convert double to double array
Eung maeng
Ranch Hand
Posts: 68
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
how to convert double to double array
Does anyone answer to me?
e.g. double aa = 12.0;
double[] bb = new bb[5];
for(int i=0; i<bb.length;i++){
bb[i]= aa ???
}
thanks
Henry Wong
author
Posts: 23951
142
I like...
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
A double holds a single value. A double array could hold many values. What do you mean by convert? Or do you mean simply assign them all to the same value, like so?
double aa = 12.0; double[] bb = new double[5]; for(int i = 0; i < bb.length; i++){ bb[i]= aa; }
Henry
Books:
Java Threads, 3rd Edition
,
Jini in a Nutshell
, and
Java Gems (contributor)
Eung maeng
Ranch Hand
Posts: 68
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
thanks,
I found what's wrong in coding. I used Double[] rather than double[].
anyway,thanks for your comment. This forum is good for me.
I just had the craziest dream. This tiny ad was in it.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Initialize Array
Two Threading access the different Synchronize method in a same object.
java.lang.reflect.Array.getLength(aA)
Convert from integer to array of bytes
generate xml to java Bean
More...