AnswerBun.com

Maintain a list of words in Java 8

Stack Overflow Asked by Sansel on August 30, 2020

I am using Java 8. My response object will contain a string of words. My requirement is to compare if the string contains a specific word, from a list of search words.

I have created an enum to hold the search words. Currently there are only 10 words in enum. This list can grow in future. What is the best approach to maintain this list of search words? Can I continue adding the words to enum or is there any other scalable alternative to maintain the list of words.

Add your own answers!

Related Questions

mean(,na.rm = TRUE) returns NA and Warning Message

1  Asked on January 5, 2022 by dylan-ong

 

StringIndexOutOfBoundsException:

1  Asked on January 5, 2022 by benjamin-weed

   

How to use a promise inside a promise?

3  Asked on January 5, 2022

 

Ask in C++ code to promp user for function expression input

1  Asked on January 5, 2022 by tbaracu

     

Why does flex-basis calculation return an error in SASS?

1  Asked on January 5, 2022 by simplicius

   

Why does the ul element show when input is clicked?

1  Asked on January 5, 2022 by e-reiner

       

Why does this list element move back in the list?

1  Asked on January 5, 2022 by user13990775

   

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP