Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

capitalize string java

String str = "hello world!";

// capitalize first letter
String output = str.substring(0, 1).toUpperCase() + str.substring(1);

// print the string
System.out.println(output);
// Hello world!
Comment

capitalize each word in string java

//You can user the WordUtils class from apache commons-text library
WordUtils.capitalize(str) 
Comment

capitalize string java

String str = "java";
String cap = str.substring(0, 1).toUpperCase() + str.substring(1);
Comment

PREVIOUS NEXT
Code Example
Java :: java program to print 1 to 100 using for loop 
Java :: java 11 download 64 bit 
Java :: array to arraylist java 
Java :: java remove duplicates from list by property 
Java :: how to open an activity from a fragment 
Java :: java char to charsequence 
Java :: remove extra spaces java 
Java :: region in android studio 
Java :: float vs double java 
Java :: area of circle in java 
Java :: print the list in java 
Java :: java date string 
Java :: java random primary key 
Java :: delay a function call in java 
Java :: java convert LocalDateTime to long 
Java :: how to get a section of an array in java 
Java :: Diamond pattern program in java 
Java :: select max value from list java 
Java :: start fragment from activity 
Java :: convert int[] to list java 
Java :: swing setbounds 
Java :: Java Stack class pop() method 
Java :: java send request 
Java :: why bufferedreader is faster than scanner 
Java :: java variable in string 
Java :: java scanner string nextline after nextint 
Java :: keytool error: java.io.FileNotFoundException: my-release-key.keystore (Access is denied) java.io.FileNotFoundException: my-release-key.keystore (Access is denied) 
Java :: remove last <br/ from string java 
Java :: java convert java.util.Date to LocalDate 
Java :: Delete end element in string java 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =