Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {

    static boolean isStringValidURL(String str) {
        return isValidString(str)
                && (str.toLowerCase().startsWith("http://") || str.toLowerCase().startsWith("https://"));
    }

    private static boolean isValidString(String str) {
        return str != null && str.length() != 0;
    }
}