Write a method, getSecondLine, that is passed a String argument and that returns the second line, without its newline character.

LANGUAGE: Java

CHALLENGE:

Write a method, getSecondLine, that is passed a String argument and that returns the second line, without its newline character.
(Recall that lines are terminated with the “\n” character .) Assume that the argument contains at least two complete, newline-terminated lines.

SOLUTION:

The Bad News: The content you are trying to access is only available to members.

The Good News: You too can be a member, simply Click Here.

Already a member?

Posted in ,