Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.io.File;

public class Main {

    /**
     * org/my/Class.xxx -> org/my/Class
     */
    public static String stripExtension(final String pResourceName) {
        final int i = pResourceName.lastIndexOf('.');
        if (i < 0) {
            return pResourceName;
        }
        final String withoutExtension = pResourceName.substring(0, i);
        return withoutExtension;
    }
}