Thread: Java-Beginer
View Single Post
Old 04-27-2010   #1
7anzala
Registered Member
 
7anzala's Avatar
 
Last Online: 05-15-2012
Join Date: Sep 2006
Posts: 530
Thanks: 9
Thanked 41 Times in 34 Posts
Groans: 0
Groaned at 1 Time in 1 Post
Default Java-Beginer

(a) Create a new class Test_Array that has the following 3 class methods:
(i)
fillArray() takes an integer array as an argument. It allows user to fill-up values in this array by using a for loop and a series of dialog boxes.

public static void fillArray(int[] value)
{
String valueInput;
String length;
length = OUDialog.request("How much Value to store?", "1");
value = new int[Integer.parseInt(length)];
for(int i=0; i<value.length; i++)
{
valueInput=OUDialog.request("Please insert an integer value", "0");
value[i]=Integer.parseInt(valueInput);
}
}



int[] a;
Test_Array.fillArray(a);



when executing the array a is stayed null and is not affected.....

what is mistake? pleeeeeeeeeeeeeeeeeeeeeeease help me
__________________
ALEXANDER Al-Kabeer
Gonna rule you all...
7anzala is offline   Reply With Quote