aspose file tools
The moose likes Beginning Java and the fly likes insert int values to double array Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "insert int values to double array" Watch "insert int values to double array" New topic
Author

insert int values to double array

Aravind Prasad
Ranch Hand

Joined: Dec 28, 2005
Posts: 258
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
Bartender

Joined: Aug 16, 2005
Posts: 12929
    
    3

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.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: insert int values to double array
 
Similar Threads
compare values in String array
Help with Data Array for Hash Table creation
Syntax error- HELP
from a 2d array to a regular array....
Marcus Exam 3 Qn# 54