Java tutorial
//package com.java2s; import java.io.File; public class Main { public static final String BAM_FILE_EXTENSION = ".bam"; public static boolean isBamFile(final File file) { return ((file != null) && file.getName().endsWith(BAM_FILE_EXTENSION)); } }