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 resType(String url) {
        if (url.contains(".jpg")) {
            return "jpg";
        } else if (url.contains(".css")) {
            return "css";
        } else if (url.contains(".js")) {
            return "js";
        } else if (url.contains(".png")) {
            return "png";
        } else if (url.contains(".jpeg")) {
            return "jpeg";
        } else {
            return "gif";
        }
    }
}