Write a method called wordWrap that accepts a Scanner representing an input file
ID: 3659148 • Letter: W
Question
Write a method called wordWrap that accepts a Scanner representing an input file as its parameter and outputs each line of the file to the console, word-wrapping all lines that are longer than 60 characters. For example, if a line contains 112 characters, the method should replace it with two lines: one containing the first 60 characters and another containing the final 52 characters. A line containing 217 characters should be wrapped into four lines: three of length 60 and a final line of length 37. Just need help on the method not the whole codeExplanation / Answer
http://www.javaprogrammingforums.com/whats-wrong-my-code/8977-cant-get-lines-cut-60-characters-continue-next-line-right.html Just check the above link.. This would be more than helpful for you. Please Rate :-)
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.