Answers for "how to read text file and change into words array in java"

0

how to put all words from a file in an array java

import java.util.ArrayList;

ArrayList<String> words= new ArrayList<>();
    while (x.hasNext()) {
        String a = x.next();
        words.add(a);
    }
Posted by: Guest on January-02-2021

Code answers related to "how to read text file and change into words array in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language