Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static Long getIndexFromName(String name) {
        int last = name.lastIndexOf("-");
        String aux = name.substring(last + 1);
        long r = 0;
        try {
            r = Long.parseLong(aux);
            return new Long(r);
        } catch (Exception ex) {
            return null;
        }
    }
}