Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {

    private static String urlToFileName(String url) {
        int pos = url.lastIndexOf("/");
        if (pos < 0)
            pos = 0;
        else
            pos += 1;
        return url.substring(pos);
    }
}