Friends, today I will tell you through this blog how you can get his first word from any string through java. Let’s try to understand through java.
Get First Word from String Using Java, Extract First Word from String by Java, How to Fetch First Word from String in Java
You have written the code of java below in a very easy way. Through which you can very easily samajh how you can get his first word from string via java.
Extract First Word from String by Java
String mystring = "Experts PHP Technology Pvt Ltd."; String arr = mystring.split(" ", 2); String firstWord = arr; //Experts