write a java program to convert first character of every word into uppercase (Need simple answers please!!)
Asna123:
Can I send only the code
Answers
Answered by
3
Don't refer to that text book thing...refer only the written one
Attachments:
Answered by
2
import java.util.*;
public class case_change
{
public static void main(String args[])
{
Scanner in = new Scanner(System.in);
int l,i;
String s,sn="",ch;
System . out . println("Enter a sentence = ");
s= in . nextLine();
s = " "+s;
l= s . length();
for(i=0;i<l-1;i++)
{
if(s . charAt(i)==' ')
{
ch =""+s . charAt(i+1);
sn = sn+ch . toUpperCase();
}
else
sn = sn+s . charAt(i+1);
}
System . out . println(sn);
}
}
please mark it as brainliest...
^_^
Similar questions
Political Science,
7 months ago
Hindi,
7 months ago
Math,
7 months ago
Computer Science,
1 year ago
Math,
1 year ago