Can you help? I tried to output max, min and average variables of massive
package com.company; public class Main { public void main (String[] args){ int l = 100; double [] massive = new double [l]; double minimum = 0; double maximum = 0; double summary = 0; for (int i = 0; i < l; i++) { massive [i] = Math.random(); if (massive[i] < minimum) { minimum = massive[i]; } if (massive[i] > minimum) { maximum = massive[i]; } summary = summary + massive[i]; } double average = summary/l; System.out.println(maximum); System.out.println(minimum); System.out.println(average); } } It outputs to console java.lang.NullPointerException: null receiver What I did wrong? I tried to google this, but I don't know where null there.