import java.util.*; class UseArrays17 // Demonstrates a method which returns the largest integer in an array. // This method shows the use of tail recursion where normally the algorithm // would be implemented using iteration. { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Enter some numbers (all on one line, separated by spaces):"); String line = input.nextLine(); String[] numbers = line.split(" +"); int[] a = new int[numbers.length]; for(int i=0; ibiggestSoFar) return biggest(a,a[i],i+1); else return biggest(a,biggestSoFar,i+1); else return biggestSoFar; } }