-3

Can any one help me how to convert the object in to first letter as capital. that should look like..

Example: yes 
Expected : Yes.
Anu
  • 11
  • 4
  • what object do you mean ? – msagala25 Feb 20 '17 at 05:43
  • Please show the code you have written. We do not do homework or write code for you. – Jim Garrison Feb 20 '17 at 05:43
  • You need to change a string to have first letter capital? – Naveed S Feb 20 '17 at 05:43
  • 1
    `String#charAt` would be a good start, possibly followed by `Character#toUpperCase` and if you want to be really fancy, couple it all together with `StringBuilder` - or you could actually try [goggling](https://www.google.com.au/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=java+proper+case+string) for a solution – MadProgrammer Feb 20 '17 at 05:43

1 Answers1

1

Things could be better if you could explain a bit more about the object you are talking about however by the example you quoted Take the first letter of the string and then convert it to capital with Character.toTitleCase(ch) . Refer to the following links for details and please share the object for better explanation Link 1 Link 2 Link 3

Community
  • 1
  • 1
OshoParth
  • 1,492
  • 2
  • 20
  • 44