# Arrays

remi
Arrays
Posted in : Java Beginners

August 12, 2009 at 12:43 PM

Hi Friend,

Try the following code:

import java.util.*;

public class ThreeArrayLists{
public static void main(String[]args){
double [] price={10.62, 14.89, 13.21, 16.55, 18.62, 9.47, 6.58, 18.32, 12.15, 3.98};
ArrayList priceList=new ArrayList();
for (int i=0; i<price.length; i++) {
}
double [] quantity={ 4, 8.5, 6, 7.35, 9, 15.3, 3, 5.4, 2.9, 4.8};
ArrayList quantityList=new ArrayList();
for (int i=0; i<quantity.length; i++) {
}
double [] amount=new double[10];
ArrayList amountList=new ArrayList();
for(int i=0; i<amount.length; i++){
amount[i] = price[i]*quantity[i];
}
System.out.println(amountList);
}
}

Thanks

arrays
arrays  using arrays in methods   Java use arrays in methods import java.util.*; class ArrayExample{ public static int getMaxValue(int[] arr){ int maxValue = arr[0]; for(int i=1;i < arr.length;i
arrays
Store a table with students and information (name, ID, password, crypted password, etc) in a multi-dimensional array "stud"  Arrays and Strings: Store a table with students and information (name, ID, password, crypted password
Arrays
Arrays   Hi I need help with the following exercises. Exercise 1: Write a Java application in which the user is prompted for the total number of integer values to be stored in an array. Initialize the array with random values
Arrays
called Rebel.java; 2.Create two arrays. One of them must store integer numbers... the numbers in the second array by 3; 7.Print out the contents of both arrays. 8.Swap
Arrays in java
Arrays in java  what is param array in java
java arrays
java arrays  can i know how can we intilize the three dimentional arrays in java? and how can we assign thae values to that array
java arrays
java arrays  i need a java program to store student details like id,name,addr,marks,average,total..using arrays..input data using scanner class and by using class, object and constructor
Java with Arrays
Java with Arrays  I was given the assignment to create two parallel arrays; both of size 50 (declares 50 as a constant) One is an array of strings... and store it in the arrays. The input for the problem should be provided in a text
create arrays in JavaScript
create arrays in JavaScript  How to create arrays in JavaScript
How to create arrays in JavaScript?
How to create arrays in JavaScript?  How to create arrays in JavaScript
Compare two Byte Arrays?
Compare two Byte Arrays?  Compare two Byte Arrays
Comparing arrays not working correctly?
Comparing arrays not working correctly?  Comparing arrays not working correctly
java arrays
java arrays  how do you write the code for multipliying 2 double arrays to be in a 3rd double array? here is my code: package employeepay; /** * * @author Owner */ public class Main { /** * @param args the command line
arrays in java - Java Beginners
arrays in java  Hi All, I have two arrays. in this two array some name are same. I want to merge those arrays into single. But while merging I want to delete duplicate entries. How merge those arrays. Thanks, mln15584
java; arrays - Java Beginners
java arrays example  How can you create a program, by using arrays and the output would be X. by using char or string.Thank you
What is javascript Arrays?
What is javascript Arrays?   Hi, I am learner of JavaScript. My question is that What is JavaScript Arrays ? How to Define the JavaScript arrays in you program. Please give an example show that i will try my self. Thanks
Are arrays primitive data types?
Are arrays primitive data types?   Hi, Are arrays primitive data types? thanks   Hi, In Java, Arrays are objects. Identifier are some simple variable names which is defined as the value container. The type of value
combine two arrays in php
combine two arrays in php  combine two arrays in php   \$newArray = array_combine(\$diff, \$pages_name['data']); foreach (\$newArray as \$data) { var_dump(\$data); exit('zzzzz'); echo \$data . '<br>