Search results

  1. J

    What is the method to check next word? Java?

    File file = new File(fileName); Scanner scan = new Scanner (file); while(scan.hasNextWord()) { } Is there such thing as hasNextWord()? I need to store each word on specific text file and store them as array and print them out individually. For example, if hello.txt contains -- Hello, my name...
  2. J

    How to sort calling method from other Java program?

    The code below is the method to sort. I need to call sorting method to sort the integers on my main program. Where and what type of code would I write to make it sort? I tried like Sorting.selectionSort(), Sorting.selectionSort(Comparable[] array)but those didn't work. This is the outlook of...
Back
Top