Example:
Code: Select all
String myString = "hello$how are you$123";
String myEncodedString = URLEncoder.encode(myString,"UTF-8")
System.out.println(myEncodedString);
Code: Select all
"hello$how^+are^+you$123";
Code: Select all
"hello$how+are+you$123";