Java program that reads text file, that contains a list of positive integers….