Java - Write code to Return a string concatenation of "\n" based on the numberOfNewLines

Requirements

Write code to Return a string concatenation of "\n" based on the numberOfNewLines

Demo

//package com.book2s;

public class Main {
    public static void main(String[] argv) {
        int numberOfNewLines = 42;
        System.out.println(newLine(numberOfNewLines));
    }//from  ww w .  j a  v  a 2 s .c  om

    private final static String EMPTY = "";

    /**
     * Return a string concatenation of "\n" based on the numberOfNewLines
     * @param   numberOfNewLines   The amount of "\n" to return
     * @return   Concatenation of "\n"
     */
    public static String newLine(int numberOfNewLines) {
        String newLineOutput = EMPTY;

        for (int i = 0; i < numberOfNewLines; i++) {
            newLineOutput += "\n";
        }

        return newLineOutput;
    }
}