Page 2 of 2 FirstFirst 12
Results 21 to 26 of 26
  1. #21
    huntrguy102 is offline Member
    Join Date
    Oct 2010
    Posts
    15
    Rep Power
    0

    Default

    ok so I need to add more to that? because at this point i get a blank output.

  2. #22
    huntrguy102 is offline Member
    Join Date
    Oct 2010
    Posts
    15
    Rep Power
    0

    Default

    so i'm guessing I need to add to that because at this point it is just a blank output.

  3. #23
    joshdgreen's Avatar
    joshdgreen is offline Senior Member
    Join Date
    Oct 2010
    Location
    Colorado Springs, CO
    Posts
    212
    Rep Power
    4

    Default

    Outside of the "if" statement you need to print out the current character at index position 'i'.
    Sincerely, Joshua Green
    Please REP if I help :)

  4. #24
    huntrguy102 is offline Member
    Join Date
    Oct 2010
    Posts
    15
    Rep Power
    0

    Default

    ok so I did that.

    here is my code now.

    Java Code:
    	for(int i = 0; i < length; i++)
    	{
    		if( (i % 60) == 0 ){
    		
    		
    		}
    		char wordBreak = temp.charAt(i);
    		System.out.print(wordBreak);
    	}

  5. #25
    joshdgreen's Avatar
    joshdgreen is offline Senior Member
    Join Date
    Oct 2010
    Location
    Colorado Springs, CO
    Posts
    212
    Rep Power
    4

    Default

    Looks good, but what happened to this statement?

    Quote Originally Posted by huntrguy102 View Post
    so more like this?

    if( (i % 60) == 0 ){
    System.out.println();
    }
    Sincerely, Joshua Green
    Please REP if I help :)

  6. #26
    huntrguy102 is offline Member
    Join Date
    Oct 2010
    Posts
    15
    Rep Power
    0

    Default

    oops i forgot to put that in again.I just did that and the program works great, except the last ingredient i need in is the hyphen. How to I go about putting that in?

Page 2 of 2 FirstFirst 12

Similar Threads

  1. I'm having a problem trying wrap up this code
    By feastfulsaint in forum Advanced Java
    Replies: 12
    Last Post: 07-17-2010, 07:27 PM
  2. creating word writer
    By Anchal in forum AWT / Swing
    Replies: 3
    Last Post: 04-06-2010, 09:00 AM
  3. JTextArea Wrap Around or something?
    By Krooger in forum New To Java
    Replies: 6
    Last Post: 11-28-2009, 04:29 AM
  4. Word Wrap not functioning correctly?
    By zerkz in forum New To Java
    Replies: 2
    Last Post: 10-08-2009, 06:41 PM

Posting Permissions

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