Java程序:将字符串中每个单词的首字母大写化
A string is a class of 'java.lang' package that stores a series of characters. Those characters are actually String-type objects. We must enclose the value of string within double quotes. Generally, we can represent characters in lowercase and uppercase in Java. And, it is also possible to convert lowercase characters into uppercase. This article aims to discuss a Java program to convert the first character of each word into uppercase in a string.
Java program to Capitalize the first character of each word in a String
Before making a Java program to convert the first lowercase character of a string into uppercase, let's understand the problem statement first with the help of an example −
实例
Input String
simply easy learning tutorialspoint 登录后复制