This week's book giveaway is in the OCP forum.
We're giving away four copies of OCP Java SE 8 Programmer II Exam Study Guide and have Kathy Sierra, Bert Bates, & Elizabeth Robson on-line!
See this thread for details.
Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to convert double to double array  RSS feed

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
author
Marshal
Posts: 23436
138
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?



Henry
 
Eung maeng
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!