Answers for "“how to get the first letter of a string to upper case in java” Code Answer’s"

3

how to uppercase the first letter of a string in java

String str = "java";
String cap = str.substring(0, 1).toUpperCase() + str.substring(1);
// cap = "Java"
Posted by: Guest on November-24-2020
0

1. Write a program in Java to accept a string in lowercase and change the first letter of every word to uppercase. Display the new string.

Input a Sentence: the quick brown fox jumps over the lazy dog.         
The Quick Brown Fox Jumps Over The Lazy Dog.
Posted by: Guest on February-11-2021

Code answers related to "“how to get the first letter of a string to upper case in java” Code Answer’s"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language