Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;

public class Main {

    public static void main(String[] args) {
        File aFile;
        try {
            aFile = new File(new URI("file:///c:/a.bat"));
            System.out.println(aFile.getName());//false
        } catch (URISyntaxException e) {
            e.printStackTrace();
        }

    }
}