Write code to Return a string concatenation of "\n" based on the numberOfNewLines
//package com.book2s; public class Main { public static void main(String[] argv) { int numberOfNewLines = 42; System.out.println(newLine(numberOfNewLines)); }/*from w w w .j a v a 2 s. co m*/ 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; } }