Java - Convert the first character of each word in a string to Lowercase
![Image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAmqUywmYeEsXX3_YUMlznAjhW4fHwxW9kS-jYjuSTU_yTXQzYxJSNWDm4AS3dHixGaUgDcZpx08idwYj9pvMqQTpU13WGOczIZHtzkQJg57vvn09TcEP1f8bwQ8AWQDkW02MPQMLbVjeqN74hfNTEz_cbRP1hyFNJIAtCuvXegLEv_Q1IPVx1e9vHej6n/w400-h216/first-letter-lowercase-each-word-java.png)
In this section, we will show five different ways to convert the first character of each word in a string to Lowercase in Java. 1. Using For loop and toLowerCase() method 2. Using Java 8 Streams 3. Using regex and replaceAll() method 4. Using Apache Commons Text 5. Using Google Guava 1. Using For loop and toLowerCase() method public class Main { public static void main ( String [] args) { String string = "JAVA IS AWESOME" ; String [] arr = string .split( " " ); StringBuilder stringBuilder = new StringBuilder (); for ( int i = 0 ; i < arr . length ; i ++) { stringBuilder .append( Character . toLowerCase ( arr [ i ].charAt( 0 ))) .append( arr [ i ].substring( 1 )).append( " " ); } String result = stringBuilder .toString(); System . out .println( result ); } } Here we are using split() split the string based on whitespace. It returns an Array of St