String currentString ="Hello Java-Hello World";String[] separated = currentString.split("-");
separated[0];// this will result into "Hello Java"
separated[1];// this will result into "Hello World"
String currentString = "Hello Java-Hello World";
String[] separated = currentString.split("-");
separated[0]; // this will result into "Hello Java"
separated[1]; // this will result into "Hello World"