java string to java string spliting a comma and a space code example
Example 1: separate string by comma java
String names = "prappo,prince";
String[] namesList = names.split(",");
Example 2: hwo to split string by spaces in java
String lineOfCurrencies = "USD JPY AUD SGD HKD CAD CHF GBP EURO INR";
String[] currencies = lineOfCurrencies.split(" ");