Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.nio.file.Path;
import java.nio.file.Paths;

public class Main {

    public static void main(String[] args) {

        //define the fix path
        Path base_1 = Paths.get("C:/tutorial/Java/JavaFX");
        Path base_2 = Paths.get("C:/tutorial/Java/JavaFX/Topic.txt");

        //resolve sibling Demo.txt file
        Path path_3 = base_2.resolveSibling("Demo.txt");
        System.out.println(path_3.toString());

    }

}