Write a Java program that meets the following requirements:-
Using up to and including Chapter 20 concepts.
Found at the end of chapter 20, #20.1 Display words in ascending alphabetical order, but with these
changes. Make it a GUI program using JavaFX. Display the input and include a button the user can click
which will then display the text in alphabetical order.
Due to absence of book mentioned, we provide only the part of answer:
public static List<String> getWordsInASC(String text){
List<String> list = new ArrayList<>();
Pattern p = Pattern.compile("[A-Za- z]+");
Matcher m = p.matcher(text.toLowerCase());
while (m.find()){
list.add(m.group());
}
return list.stream().sorted().collect(Collectors.toList());
}
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
JavaJSPJSF