Java - Write code to Return a string concatenation of "\t" based on the numberOfTabs

Requirements

Write code to Return a string concatenation of "\t" based on the numberOfTabs

Demo

//package com.book2s;

public class Main {
    public static void main(String[] argv) {
        int numberOfTabs = 42;
        System.out.println(tab(numberOfTabs));
    }//from  w  w  w  .ja v  a2s. c o m

    private final static String EMPTY = "";

    /**
     * Return a string concatenation of "\t" based on the numberOfTabs
     * @param   numberOfTabs   The amount of "\t" to return
     * @return   Concatenation of "\t"
     */
    public static String tab(int numberOfTabs) {
        String tabOutput = EMPTY;

        for (int i = 0; i < numberOfTabs; i++) {
            tabOutput += "\t";
        }

        return tabOutput;
    }
}