Explore BrainMass

Explore BrainMass

    Find largest and smallest numbers in the file of numbers.

    Not what you're looking for? Search our solutions OR ask your own Custom question.

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Write a Java program that will search a text file of strings representing numbers of type int and will write the largest and the smallest numbers to the screen. The file contains nothing but strings representing numbers of type int one per line. Solution can use either the BufferedReader class or the Scanner class.

    © BrainMass Inc. brainmass.com March 4, 2021, 10:14 pm ad1c9bdddf
    https://brainmass.com/computer-science/files/find-largest-and-smallest-numbers-in-the-file-of-numbers-312564

    Solution Preview

    Please rename attached 312564.java as SearchNumbers.java before ...

    Solution Summary

    A file named "numbers.txt" has to be placed in same directory as the compiled Java class file. This file should hold the numbers as specified in the question.

    $2.49

    ADVERTISEMENT