60 323
Assignments Done
98%
Successfully Done
In April 2018

Answer to Question #68166 in Java | JSP | JSF for Joe

Question #68166
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.
Expert's answer
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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions