Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
/**
 *******************************************************************************
 * @file Helper.java
 * @author Keidan
 * @date 30/04/2016
 * @par Project HexViewer
 *
 * @par Copyright 2016 Keidan, all right reserved
 *
 *      This software is distributed in the hope that it will be useful, but
 *      WITHOUT ANY WARRANTY.
 *
 *      License summary : You can modify and redistribute the sources code and
 *      binaries. You can send me the bug-fix
 *
 *      Term of the license in in the file license.txt.
 *
 *******************************************************************************
 */

public class Main {
    public static String basename(final String path) {
        String s = path;
        final int i = s.lastIndexOf('/');
        if (i != -1)
            s = s.substring(i + 1);
        return s;
    }
}