Java tutorial
//package com.java2s; public class Main { /** * checks whether the url is image url or not. * * @param url * @return boolean */ public static boolean isUrlImage(String url) { if (url.contains("png") || url.contains("jpeg") || url.contains("jpg")) return true; return false; } }