How do I get toString () to return a multiline string?
I am working on a program that loops through an array and finds the smallest value and then prints the time, firstName and lastName for the runner.
I need to figure out how to return three values ββon separate lines, for example:
public String toString() {
return String.format( firstName + " " + lastName + " " + Time );
}
What i have right now
Is there a way to print the three values ββon separate lines?
+3
source to share
4 answers