MainClass.java Source code

Java tutorial

Introduction

Here is the source code for MainClass.java

Source

import java.util.Arrays;

public class MainClass {

    public static void main(String[] arg) {
        double[] data = new double[50]; // An array of 50 values of type double
        Arrays.fill(data, 1.0); // Fill all elements of data with 1.0

        for (int i = 0; i < data.length; i++) { // i from 0 to data.length-1
            System.out.println(data[i]);
        }

    }
}