Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package sort;
- import java.util.ArrayList;
- import java.util.Arrays;
- import java.util.List;
- import java.util.Random;
- public class Sort
- {
- public static void main(String[] args)
- {
- List<Double> list = new ArrayList();
- Random random = new Random();
- for(int i=0;i<5;i++)
- {
- double value = random.nextDouble();
- list.add(value);
- }
- //System.out.println(Arrays.toString(list.toArray()));
- Double[] array = list.toArray(new Double[list.size()]);
- System.out.println(Arrays.toString(array));
- }
- }
Add Comment
Please, Sign In to add comment