hi all is there any way to copy one array into another without a loop i am sure there is one. I know both arrays of same dimesion.
but if it some thing like this
where newCentroids is a float array of size 3 and and CentroidValues(ArrayList ar) is a method that return a float array.
my program shows an error at this point
Joined: Jan 09, 2004
Deepika what is he error you are getting ?
Is this error being caused because you are trying to assign an array of type float to an ArrayList.
and than later you try this,
[ June 24, 2005: Message edited by: Abdulla Mamuwala ]
Shyam Prasad Murarka
Joined: May 02, 2005
Dear Deepika, I don't know whether what I am going to say is right or wrong. In case I am wrong I would appreciate it if somebody corrected me. Ok, so I noticed that when you were assigning the values to the array then at that point of time you were not declaring the array. This means that you must have already declared the array and now you want to simply initialize it. Your statement was as follows:
The correct one should have been this way:
You notice the elimination of the square brackets in the second case. That should not be there when you are declaring and initializing the array differently. But at the time of declaration the square brackets are necessary.
NOTE: If what I said was correct then please post a small post saying that my solution was helpful as even I am not sure whether what I said was right.