Package test

Class IOSearcher

java.lang.Object
test.IOSearcher

public class IOSearcher extends Object
  • Constructor Details

    • IOSearcher

      public IOSearcher()
  • Method Details

    • search

      public static boolean search(String word, String... fileNames) throws Exception
      The search function takes a String word and an array of Strings fileNames as parameters. It returns true if the word is found in any of the files, false otherwise.
      Parameters:
      word - String -Search for the word in the file
      fileNames - An array of String -Pass a variable number of arguments to the function
      Returns:
      A boolean
      Throws:
      Exception