import java.util.Scanner; public class Program6{ public static void main(String[] args){ Scanner scan=new Scanner (System.in); double latest, max = -Double.MAX_VALUE; System.out.print("Enter several double numbers, followed" +" by D twice: "); while(scan.hasNext()){ latest = scan.nextDouble(); if (latest > max) max = latest; } System.out.println ("\nThe largest of your numbers is " + max); } }