Check out example codes for "java method to capitalize first letter". It will help you in understanding the concepts better.

Code Example 1

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

Learn ReactJs, React Native from akashmittal.com