Write a method, getFirstLine, that is passed a String argument and that returns the first line.

LANGUAGE: Java

CHALLENGE:

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

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 ,