May I know how to find the Maximum value from the integers which being entered? As I search from a book, it did specify MAX_VALUE as a keyword, but I still cannot get it. Please help me, thanks.
import java.io.*;
class numbers
{
public static void main (String args[]) throws IOException
{
BufferedReader koay = new BufferedReader (new InputStreamReader (System.in));
int B, MN=0;
int total=0;
float n=0;
do
{
System.out.print("Type an integer: ");
String input = koay.readLine();
B = Integer.parseInt(input);
if(B>=1)
{
total=total + B ;
n=n+1;
}
}
while (B!=0);
System.out.println("The max value is " );
System.out.println("The sum value is " + total + " and the average is " + (total/n));
}
}