Page 3 of 3 FirstFirst 123
Results 41 to 48 of 48
  1. #41
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,336
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by stringkilla View Post
    Java Code:
    if ((vowels.indexOf(prev_char)>= 0) && (input1.charAt(i)==' '))
    	{
    		input2 = input1.substring(i,i+1);
    		output = output.concat(input2);
    	}
    this doesnt work either?
    Beats me; you have to fix it then?

    kind regards,

    Jos

  2. #42
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default

    this doesnt work either?
    Please explain what happens?

  3. #43
    stringkilla is offline Member
    Join Date
    Aug 2010
    Posts
    32
    Rep Power
    0

    Default

    Please enter a Sentence
    the quick brown fox.
    Abbreviated String: th qck brwn fx.

    Please enter a Sentence
    i like bananas i like i
    Abbreviated String: lk bnns lk

    my problem is the latter?
    Last edited by stringkilla; 09-13-2010 at 03:33 AM.

  4. #44
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default

    Can you explain what is the problem with the latter? What is it supposed to be?

  5. #45
    stringkilla is offline Member
    Join Date
    Aug 2010
    Posts
    32
    Rep Power
    0

    Default

    i am trying to make the "i'" be outputted

  6. #46
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default

    Please show the input and the desired output. There are 5 'i's in the last input.

  7. #47
    stringkilla is offline Member
    Join Date
    Aug 2010
    Posts
    32
    Rep Power
    0

    Default

    Please enter a Sentence
    i like bananas i like i
    actual: Abbreviated String: lk bnns lk
    desired: i lk bns i lk i

  8. #48
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default

    So your logic needs to consider if there are non-white space characters on either side of the vowel. I'll consider beginning and end of line as white spaces.

Page 3 of 3 FirstFirst 123

Similar Threads

  1. Image Manipulation
    By sh100 in forum New To Java
    Replies: 0
    Last Post: 11-03-2009, 10:18 AM
  2. Image manipulation
    By spike72 in forum Java 2D
    Replies: 1
    Last Post: 08-28-2009, 08:45 PM
  3. Array manipulation
    By Ms.Ranjan in forum New To Java
    Replies: 9
    Last Post: 07-18-2008, 09:10 PM
  4. String manipulation example (Title case)
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-29-2008, 09:04 AM
  5. String Manipulation Task
    By hiranya in forum New To Java
    Replies: 1
    Last Post: 11-19-2007, 11:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •