As of now I\'m using this code to make my first letter in a string capital
String output = input.substring(0, 1).toUpperCase() + input.substring(1);
<
String out = Character.toUpperCase(inText.charAt(0)) + inText.substring(1).toLowerCase();
public static void main(String[] args) {
String str = null;
String outStr = null;
Scanner sc = new Scanner(System.in);
System.out.println("Enter a String: ");
str = sc.nextLine();
//c= Character.toUpperCase(str.charAt(0));
for(int i=0; i< (str.length());i++){
if(str.charAt(i)==' '){
outStr= outStr.substring(0,i+1)+str.substring(i+1,i+2).toUpperCase()+str.substring(i+2);
}else if(i==0){
outStr=str.substring(0,1).toUpperCase()+str.substring(1);
}
}
System.out.println("STRING::"+outStr);
}