Answers for "read a text file and put all the words in it and into an 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 "read a text file and put all the words in it and into an array in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language