Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: How to capitalize a letter in String?

  1. #1
    Junior Member
    Join Date
    Jul 2013
    Thanked 0 Times in 0 Posts

    Default How to capitalize a letter in String?

    Hi everyone! How would i capitalize a letter of a word in a String ...
    For example the string is "Hello Java Programming Forums".. that is the input ... now the output must be "HeLlO JaVa PrOgRaMmInG FoRuMs".. the program should capitalize a letter in a word that is in an odd position assuming that a white space is a word separator and it the letter to be capitalized is the letter that is in odd position in every word the first letter is one (odd), next letter is two (even) and so on... SomeOne Please help me!! I really need help...!

  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Washington, DC
    My Mood
    Thanked 636 Times in 540 Posts

    Default Re: How to capitalize a letter in String?

    What have you tried? Where are you stuck? Where is your SSCCE? We aren't going to do your homework for you.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Favourite letter!
    By Dr.Code in forum Totally Off Topic
    Replies: 8
    Last Post: July 12th, 2013, 01:39 AM
  2. [SOLVED] Hangman Program Java: Comparing the User's Guess with Another String Letter by Letter
    By theonlydvr in forum What's Wrong With My Code?
    Replies: 4
    Last Post: June 29th, 2013, 05:35 PM
  3. Finding the count of a letter in a String?
    By vlkn448 in forum Algorithms & Recursion
    Replies: 7
    Last Post: July 15th, 2012, 11:55 AM
  4. Incrementing every letter in a string that occupies an odd position.
    By haktheplanet in forum What's Wrong With My Code?
    Replies: 4
    Last Post: March 22nd, 2010, 04:45 AM
  5. letter to number
    By silverspoon34 in forum Java Theory & Questions
    Replies: 1
    Last Post: November 27th, 2009, 07:01 AM

Tags for this Thread