Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    private static String getType(String path) {

        String type;
        type = "";
        try {
            int pos = path.lastIndexOf(".");
            if (pos != -1) {
                type = path.substring(pos + 1);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return type;
    }
}