Define a method findhighestvalue() with a scanner parameter that reads integers from input until a negative integer is read. the method returns the largest of the integers read. ex: if the input is 100 95 25 -35 75 -10, then the output is: 100 note: negative numbers are less than 0.
In Java
import java.util.Scanner;
public class LargestValueFinder {
/* Your code goes here */
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
int maxVal;
maxVal = findLargestValue(scnr);
System.out.println(maxVal); } }