I want to split a string by \'=\' charecter. But I want it to split on first instance only. How can I do that ? Here is a JavaScript example for \'_\' char but it doesn\'t w
As many other answers suggest the limit approach, This can be another way
You can use the indexOf method on String which will returns the first Occurance of the given character, Using that index you can get the desired output
String target = "apple=fruit table price=5" ;
int x= target.indexOf("=");
System.out.println(target.substring(x+1));