//------------// Introduction to Programming Using Java: An Object-Oriented Approach//	Arnow/Weiss//------------// the extremePrimitive loop// Chapter 9, Section 9.6, Page 342// MODIFICATIONS://    We have placed the loop in main method and provided a BufferedReaderimport java.io.*;import java.util.*;public class Demo_extremePrimitive {	public static void main(String[] a) throws Exception {		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));		////////////////////////////////////////////////////////////////////		boolean    foundExtreme;		int     largest;		int     x;		foundExtreme  =  false;		largest  =  0;		String  line;		line  =  br.readLine();		while (line!=null) {			x  =  Integer.parseInt(line);			if (!foundExtreme  ||  x>largest) {				largest = x;				foundExtreme  =  true;			}			line  =  br.readLine();		}		System.out.println("Largest integer is "+largest);		////////////////////////////////////////////////////////////////////	}}// Here is some sample input for this program:// 3// 81// 24// 15// 7// 45// 95// 16// 80