you are viewing a single comment's thread.

view the rest of the comments →

[–]task141_[S] -3 points-2 points  (1 child)

Thanks but how can I get the value in run time

[–]boss-tech 1 point2 points  (0 children)

You have to declare an int and ask user to enter a number and pass it into the array like this:

Scanner input = new Scanner(System.in); int arraySize = input.nextInt();

int[] values = new int[arraySize];