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 changeImageParam(String url, String param) {
        if (url != null) {
            StringBuilder sb = new StringBuilder();
            if (url.contains("?")) {
                sb.append(url.substring(0, url.indexOf("?")));
            } else {
                sb.append(url);
            }
            if (param != null) {
                sb.append(param);
            }
            return sb.toString();
        }
        return null;
    }
}