Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.net.MalformedURLException;
import java.net.URL;

public class Main {

    public static boolean isUrlValid(final String strUrl) {
        if (null == strUrl) {
            return false;
        }
        try {
            new URL(strUrl);
            return true;
        } catch (final MalformedURLException e) {
            return false;
        }
    }
}