Split function | Selenium Forum
R
Revathy Poonamallee Balaji Posted on 14/02/2022

String str="order is completed. Your Transaction id is 122344566"; String myresult[]=str.split("order"); System.out.println(myresult.length); the length returned is 2. shouldn't the length be 1 cos i dont have any word before "order". and when i print to check what it is stored in result[0] and result[1] . the same line gets printed.