Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {

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

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