Пример #1
0
  public static void main(String[] args) throws Exception {

    // Reading numbers from console
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

    System.out.print("Insert max number: ");
    int max = Integer.parseInt(reader.readLine());

    System.out.print("Insert min number: ");
    int min = Integer.parseInt(reader.readLine());

    // Call method to find the random array size
    FindMassiveSize random_size = new FindMassiveSize();
    int size = random_size.FindRandomSize(max, min);

    System.out.print("Array Size is: " + size);

    // Array creation
    CreateArray raggedArray = new CreateArray();
    raggedArray.Array(size);
  }
Пример #2
0
 public static void main(String[] args) {
   Integer[] dummy = {0};
   CreateArray<Integer> creator = new CreateArray<Integer>(dummy);
   Integer[] intArray = creator.createArray(10);
   System.out.println(intArray);
 }