We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Java
- Strings
- Java Strings Introduction
- Discussions
Java Strings Introduction
Java Strings Introduction
Sort by
recency
|
1229 Discussions
|
Please Login in order to post a comment
Solution for the problem
public static void main(String[] args) {
import java.io.; import java.util.;
public class Solution { public static String capitalize(String str){ StringBuilder capitalize = new StringBuilder(); char firstChar = str.charAt(0); capitalize.append(Character.toTitleCase(firstChar)).append(str.substring(1)); return capitalize.toString(); }
}
Solution code :-
Solution in Java