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 fileNameAppend(String name, String apd) {
        int i = name.lastIndexOf(".");
        if (i == -1 || i == 0)
            return name + apd;
        return name.substring(0, i) + apd + name.substring(i, name.length());
    }
}