Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static String getValidUrl(String url) {
        if (!url.contains("http://"))
            url = "http://" + url;
        if (url.substring(url.length() - 1).equals("/"))
            url = url.substring(0, url.length() - 1);
        return url;
    }
}