Convert String="one,two,three" to String=’one’,’two’,’three’

Need to convert my String values “one,two,three” to ‘one’,’two’,’three’
I have below code

String input = "One,two,three";

Need to send this input values for an query in hibernate.

So need to send as ‘one’,’two’,’three’ as single string, please provide me a solution easy way to do it


Source: mysql

Leave a Reply