Is it a good practice to initialize the max to -100000 and min to 100000? Is there any other way to initialize both min and max to 0? import javax.swing.*;    import java.util.*;public class arrayTajba{    public static void main(String[] args) throws Exception    {        String userStringInput =  ;        String display =  ;        int max = -100000;        int min = 100000;        int total = 0;        double average;        int i = 0;        int [] num = new int [5];        for (i = 0; i < num.length; i++)        {            userStringInput = JOptionPane.showInputDialog(null,Please enter 5 numbers  + (i+1),Input Table,JOptionPane.QUESTION_MESSAGE);            num[i] = Integer.parseInt(userStringInput);            display+=num[i] + , ;            total+=num[i];            if (num[i] < min)            {                min = num[i];            }            if (num[i] > max)            {                max = num[i];            }        }            average = total / num.length;        JOptionPane.showMessageDialog(null,The numbers you have entered are:\n + display + \nSum of all numbers is:  + total + \nAverage is:  + average + \nMinimum number is:  + min + \nMaximum number is:  + max,Output Table ,JOptionPane.INFORMATION_MESSAGE);        }    }i
Min and Max initialization
java;array