Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

insert int values to double array  RSS feed

 
Aravind Prasad
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ranchers,
I'm doing a project and I'm now stuck with a point, to create a dynamic double array in Java. Can you please help me..

The values are
int i=0;
int j=10;
int k=300;
int l=8;

the values for i,j,k and l are coming from database.


I want to put these values in to a dynamic array
double [] test = new double[4];
after i want to add these values to the array..

Can you help me how to insert the values to the array!!

thanks and regards


Aravind Prasad
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16028
87
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand exactly what the problem is. You can just assign the values to the entries of the array. Ofcourse the values will be automatically converted from int to double if you do that.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!