Issues with else if Java
<p>i am having a little issue trying to create a else if loop in java, what i am trying to do is create a loop the if the number of files in a folder is 1 or less then it does one action if its great than this it goes into another loop </p>

<p>this is my loop so far but does not compile :</p>

<pre><code>if (new File(destination).listFiles().length) &lt;=1 {
        return "/GUI/printServerSide.xhtml";
    }else if
         ("txt".equalsIgnoreCase(extension)) {
            return "/GUI/submittedFilePreview.xhtml";
        } else if ("jpeg".equalsIgnoreCase(extension)) {
            return "/GUI/submittedFilePreview.xhtml";
        } else if ("jpg".equalsIgnoreCase(extension)) {
            return "/GUI/submittedFilePreview.xhtml";
        } else if ("png".equalsIgnoreCase(extension)) {
            return "/GUI/submittedFilePreview.xhtml";
        } else if ("gif".equalsIgnoreCase(extension)) {
            return "/GUI/submittedFilePreview.xhtml";
        } else if ("pdf".equalsIgnoreCase(extension)) {
            return "/GUI/submittedFilePreview.xhtml";
        } else if ("html".equalsIgnoreCase(extension)) {
            return "/GUI/submittedFilePreview.xhtml";
        } else {
            return "/GUI/printServerSide.xhtml";
        }


    }
}
</code></pre>

<p>what am i doing wrong ?</p>

<p>Thanks in advance !</p>
