Java tutorial
//package com.java2s; import java.io.File; import java.util.Locale; public class Main { public static boolean isM4AFile(File in) { return isM4AFile(in.getName()); } public static boolean isM4AFile(String in) { in = in.toLowerCase(Locale.US); return in.endsWith(".m4a") || in.endsWith(".m4p"); } }